Commits on Source (36)
-
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
54b83253 -
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.
ecadbc7e -
Vladislav Zavialov authored
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@gmail.com>
4aea0a72 -
b7600997
-
e5d3940d
-
This reverts commit 41b41577.
960ef111 -
This reverts commit 3ded9a1c.
bad1c8cc -
This reverts commit 09d93bd0.
12726d90 -
This reverts commit a0048866.
dbdd989d -
This reverts commit 0e85099b.
240483af -
This reverts commit 7872e2b6.
9b8c7dd8 -
This reverts commit 69563c97.
3364379b -
This reverts commit 5aef5658.
fda30670 -
This reverts commit b7a640ac.
1cbcda9a -
This reverts commit 5d1f2411.
fb5e99aa -
This reverts commit f3556d6c.
2cdcb3a5 -
Simon Peyton Jones authored
This fixes #23323 See (RC4) in Note [Tracking redundant constraints]
2b0c9f5e -
567b32e1
-
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 !10360 (comment 495873) for the discussion that led to this.
2b1a4abe -
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.
3ab0155b -
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
a24b83dd -
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
dcf32882 -
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.
432c736c -
Introduce a `-ddump-spec-constr` flag which debugs specialisations from `SpecConstr`. These are no longer shown when you use `-ddump-spec`.
26013cdc -
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 532de368. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/170 Fixes #23454
4639100b -
This broke the sdist generation. Fixes #23489
9c0dcff7 -
273ff0c7
-
-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.
b84a2900 -
9d1a8d87
-
Sylvain Henry authored
- 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@gmail.com>
014a06eb -
Sylvain Henry authoredabeb5d19
-
Sylvain Henry authored
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).
782e91a9 -
Sylvain Henry authored62271c0d
-
Sylvain Henry authored997cb25a
-
Sylvain Henry authored0de58ca1
Showing
- .gitlab/gen_ci.hs 17 additions, 31 deletions.gitlab/gen_ci.hs
- .gitlab/jobs.yaml 77 additions, 135 deletions.gitlab/jobs.yaml
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py 1 addition, 1 deletion.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- CODEOWNERS 5 additions, 5 deletionsCODEOWNERS
- HACKING.md 4 additions, 36 deletionsHACKING.md
- compiler/GHC.hs 30 additions, 5 deletionscompiler/GHC.hs
- compiler/GHC/Builtin/Names.hs 3 additions, 3 deletionscompiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Names/TH.hs 28 additions, 3 deletionscompiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/bytearray-ops.txt.pp 0 additions, 551 deletionscompiler/GHC/Builtin/bytearray-ops.txt.pp
- compiler/GHC/Builtin/gen_bytearray_addr_access_ops.py 201 additions, 0 deletionscompiler/GHC/Builtin/gen_bytearray_addr_access_ops.py
- compiler/GHC/Builtin/primops.txt.pp 2 additions, 228 deletionscompiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Core/TyCon.hs 11 additions, 8 deletionscompiler/GHC/Core/TyCon.hs
- compiler/GHC/Driver/Config/Core/Lint.hs 1 addition, 1 deletioncompiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/Flags.hs 1 addition, 0 deletionscompiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs 217 additions, 92 deletionscompiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs 17 additions, 15 deletionscompiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs 12 additions, 9 deletionscompiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Session.hs 2 additions, 0 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Instances.hs 5 additions, 0 deletionscompiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Type.hs 22 additions, 2 deletionscompiler/GHC/Hs/Type.hs