summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* docs: Add more details on InterruptibleFFI.Niklas Hambüchen2020-06-041-7/+34
| | | | | Details from https://gitlab.haskell.org/ghc/ghc/issues/8684 and https://github.com/takano-akio/filelock/pull/7#discussion_r280332430
* Improve parser error messages for TypeApplicationsVladislav Zavialov2020-06-011-4/+11
| | | | | | | | | | | | | | With this patch, we always parse f @t as a type application, thereby producing better error messages. This steals two syntactic forms: * Prefix form of the @-operator in expressions. Since the @-operator is a divergence from the Haskell Report anyway, this is not a major loss. * Prefix form of @-patterns. Since we are stealing loose infix form anyway, might as well sacrifice the prefix form for the sake of much better error messages.
* Fix wording in documentationJeremy Schlatter2020-06-011-1/+0
| | | | | The duplicate "orphan instance" phrase here doesn't make sense, and was probably an accident.
* rts: Drop compatibility shims for Windows VistaBen Gamari2020-05-301-0/+3
| | | | | We can now assume that the thread and processor group interfaces are available.
* users-guide: Note change in getNumProcessors in users guideBen Gamari2020-05-302-3/+8
|
* Fix typo in documentationJeremy Schlatter2020-05-291-1/+1
|
* eventlog: Fix racy flushingBen Gamari2020-05-271-0/+6
| | | | | | | | | | | Previously no attempt was made to avoid multiple threads writing their capability-local eventlog buffers to the eventlog writer simultaneously. This could result in multiple eventlog streams being interleaved. Fix this by documenting that the EventLogWriter's write() and flush() functions may be called reentrantly and fix the default writer to protect its FILE* by a mutex. Fixes #18210.
* core-spec: Modify file paths according to new module hierarchyTakenobu Tani2020-05-275-68/+68
| | | | | | | | | | | | | | | | | | | | | | | This patch updates file paths according to new module hierarchy [1]: * GHC/Core.hs <= coreSyn/CoreSyn.hs * GHC/Core/Coercion.hs <= types/Coercion.hs * GHC/Core/Coercion/Axiom.hs <= types/CoAxiom.hs * GHC/Core/Coercion/Opt.hs <= types/OptCoercion.hs * GHC/Core/DataCon.hs <= basicTypes/DataCon.hs * GHC/Core/FamInstEnv.hs <= types/FamInstEnv.hs * GHC/Core/Lint.hs <= coreSyn/CoreLint.hs * GHC/Core/Subst.hs <= coreSyn/CoreSubst.hs * GHC/Core/TyCo/Rep.hs <= types/TyCoRep.hs * GHC/Core/TyCon.hs <= types/TyCon.hs * GHC/Core/Type.hs <= types/Type.hs * GHC/Core/Unify.hs <= types/Unify.hs * GHC/Types/Literal.hs <= basicTypes/Literal.hs * GHC/Types/Var.hs <= basicTypes/Var.hs [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular [skip ci]
* Make WorkWrap.Lib.isWorkerSmallEnough aware of the old aritySebastian Graf2020-05-261-3/+4
| | | | | | | | | | We should allow a wrapper with up to 82 parameters when the original function had 82 parameters to begin with. I verified that this made no difference on NoFib, but then again it doesn't use huge records... Fixes #18122.
* users-guide: Clarify meaning of -haddock flagBen Gamari2020-05-231-2/+3
| | | | Fixes #18206.
* Implement cstringLength# and FinalPtrAndrew Martin2020-05-231-0/+12
| | | | | | | | | | | | | | | | | | | | This function and its accompanying rule resolve issue #5218. A future PR to the bytestring library will make the internal Data.ByteString.Internal.unsafePackAddress compute string length with cstringLength#. This will improve the status quo because it is eligible for constant folding. Additionally, introduce a new data constructor to ForeignPtrContents named FinalPtr. This additional data constructor, when used in the IsString instance for ByteString, leads to more Core-to-Core optimization opportunities, fewer runtime allocations, and smaller binaries. Also, this commit re-exports all the functions from GHC.CString (including cstringLength#) in GHC.Exts. It also adds a new test driver. This test driver is used to perform substring matches on Core that is dumped after all the simplifier passes. In this commit, it is used to check that constant folding of cstringLength# works.
* docs: fix formatting and add some linksAdam Sandberg Ericsson2020-05-232-45/+51
| | | | [skip ci]
* Clarify pitfalls of NegativeLiterals; see #18022.Galen Huntington2020-05-211-7/+15
|
* Fix spelling mistakes and typosbuggymcbugfix2020-05-211-1/+1
|
* Update documentation for GHCi :scriptStefan Holdermans2020-05-212-3/+8
| | | | | | | | | This patch adds the fixes that allow for file names containing spaces to be passed to GHCi's ':script' command to the release notes for 8.12 and expands the user-guide documentation for ':script' by mentioning how such file names can be passed. Related to #18027.
* gitlab-ci: Set locale to C.UTF-8.Gleb Popov2020-05-211-1/+1
|
* Refactor linear reg alloc to remember past assignments.Andreas Klebinger2020-05-212-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assigning registers we now first try registers we assigned to in the past, instead of picking the "first" one. This is in extremely helpful when dealing with loops for which variables are dead for part of the loop. This is important for patterns like this: foo = arg1 loop: use(foo) ... foo = getVal() goto loop; There we: * assign foo to the register of arg1. * use foo, it's dead after this use as it's overwritten after. * do other things. * look for a register to put foo in. If we pick an arbitrary one it might differ from the register the start of the loop expect's foo to be in. To fix this we simply look for past register assignments for the given variable. If we find one and the register is free we use that register. This reduces the need for fixup blocks which match the register assignment between blocks. In the example above between the end and the head of the loop. This patch also moves branch weight estimation ahead of register allocation and adds a flag to control it (cmm-static-pred). * It means the linear allocator is more likely to assign the hotter code paths first. * If it assign these first we are: + Less likely to spill on the hot path. + Less likely to introduce fixup blocks on the hot path. These two measure combined are surprisingly effective. Based on nofib we get in the mean: * -0.9% instructions executed * -0.1% reads/writes * -0.2% code size. * -0.1% compiler allocations. * -0.9% compile time. * -0.8% runtime. Most of the benefits are simply a result of removing redundant moves and spills. Reduced compiler allocations likely are the result of less code being generated. (The added lookup is mostly non-allocating).
* Explicit SpecificityGert-Jan Bottu2020-05-212-0/+84
| | | | | | | | | | | | | | | | | | | | Implementation for Ticket #16393. Explicit specificity allows users to manually create inferred type variables, by marking them with braces. This way, the user determines which variables can be instantiated through visible type application. The additional syntax is included in the parser, allowing users to write braces in type variable binders (type signatures, data constructors etc). This information is passed along through the renamer and verified in the type checker. The AST for type variable binders, data constructors, pattern synonyms, partial signatures and Template Haskell has been updated to include the specificity of type variables. Minor notes: - Bumps haddock submodule - Disables pattern match checking in GHC.Iface.Type with GHC 8.8
* Tweak man page for ghc commandTakenobu Tani2020-05-132-1/+6
| | | | | | | | | | This commit updates the ghc command's man page as followings: * Enable `man_show_urls` to show URL addresses in the `DESCRIPTION` section of ghc.rst, because sphinx currently removes hyperlinks for man pages. * Add a `SEE ALSO` section to point to the GHC homepage
* fix(documentation): Fix the RST links to GHC.PrimHécate2020-05-133-5/+4
|
* doc: Reformulate the opening paragraph of Ch. 4 in User's guideIvan-Yudin2020-05-131-9/+11
| | | | | | | | | Removes mentioning of Hugs (it is not helpful for new users anymore). Changes the wording for the rest of the paragraph. Fixes #18132.
* users-guide: Add discussion of shared object namingBen Gamari2020-05-132-1/+10
| | | | Fixes #18074.
* Fix Haskell98 short description in documentationDenisFrezzato2020-05-051-1/+1
|
* Remove references to -package-keySylvain Henry2020-05-052-14/+3
| | | | | | | | * remove references to `-package-key` which has been removed in 2016 (240ddd7c39536776e955e881d709bbb039b48513) * remove support for `-this-package-key` which has been deprecated at the same time
* Remove custom ExceptionMonad class (#18075) (updating haddock submodule ↵Artem Pelenitsyn2020-05-041-0/+8
| | | | accordingly)
* users guide: Add documentation for non-moving GC eventsBen Gamari2020-05-031-0/+79
|
* users guide: Move eventlog documentation users guideBen Gamari2020-05-033-55/+576
|
* rts: Enable tracing of nonmoving heap census with -lnBen Gamari2020-05-031-0/+4
| | | | | Previously this was not easily available to the user. Fix this. Non-moving collection lifecycle events are now reported with -lg.
* Document BlockArguments/LambdaCase support in arrow notationAlexis King2020-04-302-1/+22
|
* llvmGen: Remove -fast-llvm flagBen Gamari2020-04-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | Issue #18076 drew my attention to the undocumented `-fast-llvm` flag for the LLVM code generator introduced in 22733532171330136d87533d523f565f2a4f102f. Speaking to Moritz about this, the motivation for this flag was to avoid potential incompatibilities between LLVM and the assembler/linker toolchain by making LLVM responsible for machine-code generation. Unfortunately, this cannot possibly work: the LLVM backend's mangler performs a number of transforms on the assembler generated by LLVM that are necessary for correctness. These are currently: * mangling Haskell functions' symbol types to be `object` instead of `function` on ELF platforms (necessary for tables-next-to-code) * mangling AVX instructions to ensure that we don't assume alignment (which LLVM otherwise does) * mangling Darwin's subsections-via-symbols directives Given that these are all necessary I don't believe that we can support `-fast-llvm`. Let's rather remove it.
* Add "ddump-cmm-opt" as alias for "ddump-opt-cmm".Andreas Klebinger2020-04-221-1/+7
|
* Do eager instantation in termsSimon Peyton Jones2020-04-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements eager instantiation, a small but critical change to the type inference engine, #17173. The main change is this: When inferring types, always return an instantiated type (for now, deeply instantiated; in future shallowly instantiated) There is more discussion in https://www.tweag.io/posts/2020-04-02-lazy-eager-instantiation.html There is quite a bit of refactoring in this patch: * The ir_inst field of GHC.Tc.Utils.TcType.InferResultk has entirely gone. So tcInferInst and tcInferNoInst have collapsed into tcInfer. * Type inference of applications, via tcInferApp and tcInferAppHead, are substantially refactored, preparing the way for Quick Look impredicativity. * New pure function GHC.Tc.Gen.Expr.collectHsArgs and applyHsArgs are beatifully dual. We can see the zipper! * GHC.Tc.Gen.Expr.tcArgs is now much nicer; no longer needs to return a wrapper * In HsExpr, HsTypeApp now contains the the actual type argument, and is used in desugaring, rather than putting it in a mysterious wrapper. * I struggled a bit with good error reporting in Unify.matchActualFunTysPart. It's a little bit simpler than before, but still not great. Some smaller things * Rename tcPolyExpr --> tcCheckExpr tcMonoExpr --> tcLExpr * tcPatSig moves from GHC.Tc.Gen.HsType to GHC.Tc.Gen.Pat Metric Decrease: T9961 Reduction of 1.6% in comiler allocation on T9961, I think.
* stg-spec: Modify file paths according to new module hierarchyTakenobu Tani2020-04-222-11/+11
| | | | | | | | | | | | | | | | | This patch updates file paths according to new module hierarchy [1]: * GHC/Stg/Syntax.hs <= stgSyn/StgSyn.hs * GHC/Types/Literal.hs <= basicTypes/Literal.hs * GHC/Types/CostCentre.hs <= profiling/CostCentre.hs This patch also updates old file path [2]: * utils/genapply/Main.hs <= utils/genapply/GenApply.hs [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular [2]: commit 0cc4aad36f [skip ci]
* docs: drop note about not supporting shared libraries on unix systemsAdam Sandberg Ericsson2020-04-211-2/+0
| | | | [skip ci]
* Modules (#13009)Sylvain Henry2020-04-183-6/+7
| | | | | | | | | | | | | | * SysTools * Parser * GHC.Builtin * GHC.Iface.Recomp * Settings Update Haddock submodule Metric Decrease: Naperian parsing001
* Use conLikeUserTyVarBinders to quantify field selector typesRyan Scott2020-04-126-2/+162
| | | | | | | | | | | | | This patch: 1. Writes up a specification for how the types of top-level field selectors should be determined in a new section of the GHC User's Guide, and 2. Makes GHC actually implement that specification by using `conLikeUserTyVarBinders` in `mkOneRecordSelector` to preserve the order and specificity of type variables written by the user. Fixes #18023.
* Implement extensible interface filesJosh Meredith2020-04-121-0/+27
|
* Modules: type-checker (#13009)Sylvain Henry2020-04-074-9/+9
| | | | Update Haddock submodule
* Add outputable instances for the types in GHC.Iface.Ext.Types, add -ddump-hieZubin Duggal2020-04-031-0/+6
| | | | | | | | | | | | | | | | | flag to dump pretty printed contents of the .hie file Metric Increase: hie002 Because of the regression on i386: compile_time/bytes allocated increased from i386-linux-deb9 baseline @ HEAD~10: Expected hie002 (normal) compile_time/bytes allocated: 583014888.0 +/-10% Lower bound hie002 (normal) compile_time/bytes allocated: 524713399 Upper bound hie002 (normal) compile_time/bytes allocated: 641316377 Actual hie002 (normal) compile_time/bytes allocated: 877986292 Deviation hie002 (normal) compile_time/bytes allocated: 50.6 % *** unexpected stat test failure for hie002(normal)
* Modules: Types (#13009)Sylvain Henry2020-03-291-1/+1
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Update core spec to reflect changes to Core.Richard Eisenberg2020-03-205-20/+68
| | | | | | | | | | | | Key changes: * Adds a new rule for forall-coercions over coercion variables, which was implemented but conspicuously missing from the spec. * Adds treatment for FunCo. * Adds treatment for ForAllTy over coercion variables. * Improves commentary (including restoring a Note lost in 03d4852658e1b7407abb4da84b1b03bfa6f6db3b) in the source. No changes to running code.
* Update "GHC differences to the FFI Chapter" in user guide.Andreas Klebinger2020-03-191-15/+35
| | | | | | | | | The old entry had a heavy focus on how things had been. Which is not what I generally look for in a user guide. I also added a small section on behaviour of nested safe ffi calls. [skip-ci]
* Add release note about fix to #16502.Richard Eisenberg2020-03-181-0/+17
| | | | | | We thought we needed to update the manual, but the fix for #16502 actually brings the implementation in line with the manual. So we just alert users of how to update their code.
* Fix #17021 by checking more return kindsRichard Eisenberg2020-03-171-0/+71
| | | | | | | | | | All the details are in new Note [Datatype return kinds] in TcTyClsDecls. Test case: typecheck/should_fail/T17021{,b} typecheck/should_compile/T17021a Updates haddock submodule
* Document the units of -ddump-timingsMaximilian Tagher2020-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Right now, in the output of -ddump-timings to a file, you can't tell what the units are: ``` CodeGen [TemplateTestImports]: alloc=22454880 time=14.597 ``` I believe bytes/milliseconds are the correct units, but confirmation would be appreciated. I'm basing it off of this snippet from `withTiming'`: ``` when (verbosity dflags >= 2 && prtimings == PrintTimings) $ liftIO $ logInfo dflags (defaultUserStyle dflags) (text "!!!" <+> what <> colon <+> text "finished in" <+> doublePrec 2 time <+> text "milliseconds" <> comma <+> text "allocated" <+> doublePrec 3 (realToFrac alloc / 1024 / 1024) <+> text "megabytes") ``` which implies time is in milliseconds, and allocations in bytes (which divided by 1024 would be KB, and again would be MB)
* Add a -no-haddock flag.Judah Jacobson2020-03-152-1/+20
| | | | | | | | This flag undoes the effect of a previous "-haddock" flag. Having both flags makes it easier for build systems to enable Haddock parsing in a set of global flags, but then disable it locally for specific targets (e.g., third-party packages whose comments don't pass the validation in the latest GHC). I added the flag to expected-undocumented-flags.txt since `-haddock` was alreadyin that list.
* Document restriction on SCC pragma syntaxKrzysztof Gogolewski2020-03-151-1/+1
| | | | | | | Currently, the names of cost centres must be quoted or be lowercase identifiers. Fixes #17916.
* Use correct option name (-opti) (fix #17314)Sylvain Henry2020-03-142-8/+4
| | | | s/pgmo/opti
* Fixed a minor typo in codegen.rstGreg Steuck2020-03-111-1/+1
|
* docs: correct link to th haddocks from users guideAdam Sandberg Ericsson2020-02-291-1/+1
|