[Git][ghc/ghc][wip/expand-do] 10 commits: JS: clean up some foreign imports

Apoorv Ingle (@ani) gitlab at gitlab.haskell.org
Tue Nov 21 01:09:25 UTC 2023



Apoorv Ingle pushed to branch wip/expand-do at Glasgow Haskell Compiler / GHC


Commits:
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.

- - - - -
c793b629 by Apoorv Ingle at 2023-11-20T19:09:12-06:00
Expand `do` blocks right before typechecking using the `HsExpansion` philosophy.

- A step towards killing `tcSyntaxOp`

- Fixes #18324 #20020 #23147 #22788 #15598 #22086 #21206

- Note [Expanding HsDo with HsExpansion] in `GHC.Tc.Gen.Do` explains change in detail

- Note 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

- New datatype to make this expansion work `GHC.Hs.Expr.XXExprGhcRn`:
    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
- Kills `HsExpansion` and `HsExpanded` as we have inlined them in `XXExprGhcRn` and `XXExprGhcTc`

- `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`

- Ensures warnings such as
  1. Pattern mach checks
  2. Failable patterns
  3. non-() return in body statements are preserved

- Expansions inside Template haskell also work without issues.

- Kill `HsMatchCtxt` in favor of `TcMatchAltChecker`
- Make records Expand and not desugar before typechecking.

- 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)

- - - - -
2dd6f510 by Apoorv Ingle at 2023-11-20T19:09:12-06:00
- Renaming `GHC.Types.Basic.{Origin -> MatchOrigin}`

- - - - -
039d28f3 by Apoorv Ingle at 2023-11-20T19:09:12-06:00
experimenting with hpc ticks

- - - - -


30 changed files:

- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.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/Syn/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc.hs
- compiler/GHC/HsToCore/Pmc/Utils.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.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/Rename/Expr.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Arrow.hs
- + compiler/GHC/Tc/Gen/Do.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7a82fe36873243224146a4d0e6b38f60ce8d8d13...039d28f342a574f6c15204c8467d1e6da5554e11

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7a82fe36873243224146a4d0e6b38f60ce8d8d13...039d28f342a574f6c15204c8467d1e6da5554e11
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231120/7c8f5925/attachment.html>


More information about the ghc-commits mailing list