[Git][ghc/ghc][wip/expand-do] 19 commits: configure: Bump version to 9.9

Apoorv Ingle (@ani) gitlab at gitlab.haskell.org
Mon Jun 26 13:38:07 UTC 2023



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


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

- - - - -
30ddd806 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
Fixes #18324 #23147
Expands do notation before typechecking using `HsExpansion`
- Adds testcases T18324, T18324b, DoubleMatch
Expands
- Do statements
- Monadic do statements
- monadic fix blocks
- make sure fail is used for pattern match failures in bind statments
- Makes sure unused binds generate warnings
- runs the pattern match check in generated lambda exprs to avoid getting suprious pattern match failures. c.f. pmcheck/should_compile/DoubleMatch.hs
- PopSrcSpan in HsExpr to pop error context
- Discards default monad fail alternatives that are spuriously generated
- Make sure we check for generated loc span for checking if the (>>) is user written or expanded for /do/ purposes

- - - - -
73a3f528 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
- Add PopSrcSpan (XXExprGhcRn) in appropriate places while expanding statements
- correct source spans displayed for warnDiscardedDoBindings
- use `mkExpandStmt` to store original stmts along with expanded expr for using the right context for error message printing
- improves error messages for applicative do
- remove special case from isMatchContextPmChecked (long distance info is now properly propogated)
- set correct src spans to statement expansions
- Match ctxt while type checking HsLam is different if the lambda match is due to an expression generated from a do block
- call tcExpr and not tcApp in PopSrcSpan so make sure impredicativity works fine
- look into XExprs in tcInferAppHead_maybe for infering the type to make T18324 typecheck and run

- - - - -
b8a2d456 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
generate incomplete uni patterns warnings if the origin context is a generated do expansion

- - - - -
ec870a99 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
use the correct bind operator for qualified rebindable rec do expansions

- - - - -
91bf2681 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
trying out changes to heralds

- - - - -
7c517fe8 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
add location information for last statements

- - - - -
c579e7ca by Apoorv Ingle at 2023-06-26T08:37:54-05:00
do not pop context while checking the second argument to expanded (>>)

- - - - -
e5065d42 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
adjusting the generated spans for proper error messages

- - - - -
77772d74 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
change the addHeadCtxt to include the first statement of the do block for more precise error messages

- - - - -
f63a9125 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
- don't add any ctxt in addExprCtxt for `XExpr(ExpandedStmt{})` as it is not very useful, the statement ctxt is already added by `tcExpr` and `addHeadCtxt`

- - - - -
ffbd0c86 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
- addStmtCtxt to add the right statement context in the error contexts
- expansion stmt to span over bind/>>= application and pattern rather than only the arguments

- - - - -
bcd19b1b by Apoorv Ingle at 2023-06-26T08:37:54-05:00
add stmt context in tcApp rather other places

- - - - -
cb2f7a31 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
add the correct expression context in tcApp

- - - - -
22b43f35 by Apoorv Ingle at 2023-06-26T08:37:54-05:00
disable expansion if applicative do is enabled

- - - - -
7581268a by Apoorv Ingle at 2023-06-26T08:37:55-05:00
handle a special in desugaring when a do block has only one statment, the ds location should be set to that of the last statement

- - - - -
53bb2c1a by Apoorv Ingle at 2023-06-26T08:37:55-05:00
do not add argument context if it is a do statement

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Match/Constructor.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Pmc.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/SrcLoc.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e13451b4a16e0beb09a063ef2941fce9dc0a6beb...53bb2c1a3f578f278f1688b9201055168a2a53c3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e13451b4a16e0beb09a063ef2941fce9dc0a6beb...53bb2c1a3f578f278f1688b9201055168a2a53c3
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/20230626/848fed4d/attachment-0001.html>


More information about the ghc-commits mailing list