<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Ryan Scott pushed to branch wip/T18191
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/53814a6424240ab50201fdde81a6e7832c1aad3d">53814a64</a></strong>
<div>
<span>by Zubin Duggal</span>
<i>at 2020-05-26T03:03:24-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add info about typeclass evidence to .hie files

See `testsuite/tests/hiefile/should_run/HieQueries.hs` and
`testsuite/tests/hiefile/should_run/HieQueries.stdout` for an example of this

We add two new fields, `EvidenceVarBind` and `EvidenceVarUse` to the
`ContextInfo` associated with an Identifier. These are associated with the
appropriate identifiers for the evidence variables collected when we come across
`HsWrappers`, `TcEvBinds` and `IPBinds` while traversing the AST.

Instance dictionary and superclass selector dictionaries from `tcg_insts` and
classes defined in `tcg_tcs` are also recorded in the AST as originating from
their definition span

This allows us to save a complete picture of the evidence constructed by the
constraint solver, and will let us report this to the user, enabling features
like going to the instance definition from the invocation of a class method(or
any other method taking a constraint) and finding all usages of a particular
instance.

Additionally,

- Mark NodeInfo with an origin so we can differentiate between bindings
  origininating in the source vs those in ghc
- Along with typeclass evidence info, also include information on Implicit
  Parameters
- Add a few utility functions to HieUtils in order to query the new info

Updates haddock submodule
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6604906c8cfa37f5780a6d5c40506b751b1740db">6604906c</a></strong>
<div>
<span>by Sebastian Graf</span>
<i>at 2020-05-26T03:04:04-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make WorkWrap.Lib.isWorkerSmallEnough aware of the old arity

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.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cf772f19c06944f0fd03b4bdcd4a49e437084ba5">cf772f19</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-05-26T03:04:45-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Enhance Note [About units] for Backpack
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ec02f82f1ec46f57bbb5887cbec62c4fc8671f9f">ec02f82f</a></strong>
<div>
<span>by Ryan Scott</span>
<i>at 2020-05-26T06:50:27-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make GADT constructors adhere to the forall-or-nothing rule properly

Issue #18191 revealed that the types of GADT constructors don't quite
adhere to the `forall`-or-nothing rule. This patch serves to clean up
this sad state of affairs somewhat. The main change is not in the
code itself, but in the documentation, as this patch introduces two
sections to the GHC User's Guide:

* A "Formal syntax for GADTs" section that presents a BNF-style
  grammar for what is and isn't allowed in GADT constructor types.
  This mostly exists to codify GHC's existing behavior, but it also
  imposes a new restriction that addresses #18191: the outermost
  `forall` and/or context in a GADT constructor is not allowed to be
  surrounded by parentheses. Doing so would make these
  `forall`s/contexts nested, and GADTs do not support nested
  `forall`s/contexts at present.

* A "`forall`-or-nothing rule" section that describes exactly what
  the `forall`-or-nothing rule is all about. Surprisingly, there was
  no mention of this anywhere in the User's Guide up until now!

To adhere the new specification in the "Formal syntax for GADTs"
section of the User's Guide, the following code changes were made:

* `GHC.Parser.PostProcess.mkGadtDecl` no longer strips away
  parentheses from the outermost `forall` and context. Instead, these
  parentheses are preserved so that the renamer can check for nested
  `forall`s/contexts later. See
  `Note [No nested foralls or contexts in GADT constructors]` in
  `GHC.Parser.PostProcess` for more details.

  One nice side effect of this change is that we can get rid of the
  explicit `AddAnn` tracking in `mkGadtDecl`, as we no longer need to
  remember the `AddAnn`s for stripped-away parentheses.

* `GHC.Renamer.Module.rnConDecl` now checks for nested
  `forall`s/contexts, rather than checking for this in the typechcker
  (in `GHC.Tc.TyCl.badDataConTyCon`). For the most part, this code
  was ported directly from `badDataConTyCon`, but designed to work
  over `HsType`s instead of `Type`s.

  One nice side effect of this change is that we are able to give a
  more accurate error message for GADT constructors that use visible
  dependent quantification (e.g., `MkFoo :: forall a -> a -> Foo a`),
  which improves the stderr in the `T16326_Fail6` test case.

Fixes #18191.
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#b6a5ba32bafb8fbda933538b3007e755fef6f101">
compiler/GHC/Core/Opt/SpecConstr.hs
</a>
</li>
<li class="file-stats">
<a href="#f4421b4e35592648510c877ecf55b1af2b96dcee">
compiler/GHC/Core/Opt/WorkWrap/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#d01de95d8c71d4dec6a9a59146186e29a5b3fd38">
compiler/GHC/Core/Rules.hs
</a>
</li>
<li class="file-stats">
<a href="#018be522bc4813b147a1525e4f96a7a493207d96">
compiler/GHC/Hs/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#649144a78135a23cabfc90dd83c4aabf448eb6ab">
compiler/GHC/Iface/Ext/Ast.hs
</a>
</li>
<li class="file-stats">
<a href="#699117ec0ed92a01cc9116db16477e81cd1e2ff6">
compiler/GHC/Iface/Ext/Binary.hs
</a>
</li>
<li class="file-stats">
<a href="#d29ec9f7b91b6b1c871d5cd8fe463ef9952e9597">
compiler/GHC/Iface/Ext/Debug.hs
</a>
</li>
<li class="file-stats">
<a href="#ea70f9cf0a00327d944951cb4a4dfa9fe4194b2d">
compiler/GHC/Iface/Ext/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#1cf39038e57acc2a80cb5fb3fef9733e8e37b8fb">
compiler/GHC/Iface/Ext/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#bf951467d4a9aa443cb109cb4c84a2891945649b">
compiler/GHC/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#446cb12ca6cefaf1c6eb79b7db643632744263c7">
compiler/GHC/Parser/PostProcess.hs
</a>
</li>
<li class="file-stats">
<a href="#7dd1cd0f6f2164a14c83d9aa564dd32bc30e447a">
compiler/GHC/Rename/Module.hs
</a>
</li>
<li class="file-stats">
<a href="#83d23a46bb6cdc8b1edc16f1fd2c8f5c53e2c9ca">
compiler/GHC/Tc/TyCl.hs
</a>
</li>
<li class="file-stats">
<a href="#2eac51f9871ca0c0698aa1fc7f79c05ef8fc4a49">
compiler/GHC/ThToHs.hs
</a>
</li>
<li class="file-stats">
<a href="#dda0490abed78f0a26a003f2bde76a7311d05c8e">
compiler/GHC/Unit.hs
</a>
</li>
<li class="file-stats">
<a href="#b421960e854c6cfa1e4ca830bd6a5fc6eef91168">
docs/users_guide/8.12.1-notes.rst
</a>
</li>
<li class="file-stats">
<a href="#afd1105d8e32dc50acf9fc381b4433a3bcd009cf">
docs/users_guide/exts/explicit_forall.rst
</a>
</li>
<li class="file-stats">
<a href="#0cc784483e34410e9b43b5cfc23ee304faba81d1">
docs/users_guide/exts/gadt_syntax.rst
</a>
</li>
<li class="file-stats">
<a href="#2e45f2cd303dd998950a7c8042e796a5b2abd64f">
docs/users_guide/using-optimisation.rst
</a>
</li>
<li class="file-stats">
<a href="#acf377a6048463af1be7194687028ceca893b4d0">
testsuite/tests/dependent/should_fail/T16326_Fail6.stderr
</a>
</li>
<li class="file-stats">
<a href="#6ef4f569c6fe7aa5345ba1eb75f039b06e91950b">
testsuite/tests/gadt/T12087.stderr
</a>
</li>
<li class="file-stats">
<a href="#8509bb9f0f6ac1ee468886ad737f9cec2fae114e">
testsuite/tests/gadt/T14320.hs
</a>
</li>
<li class="file-stats">
<a href="#93de4a073428e4fe5008cbc7548d0a02e940b599">
<span class="new-file">
+
testsuite/tests/gadt/T14320.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#e1050500257a847cc4105b93168583a72a01cec5">
testsuite/tests/gadt/T16427.stderr
</a>
</li>
<li class="file-stats">
<a href="#3f671452b7fb08de044a7961845d1cd0a3267367">
<span class="new-file">
+
testsuite/tests/gadt/T18191.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#6adce33441521c9a45a2444bb43e44da8e212513">
<span class="new-file">
+
testsuite/tests/gadt/T18191.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#c68bb340f8f227ab4ac9922422ce0177433e1dfc">
testsuite/tests/gadt/all.T
</a>
</li>
<li class="file-stats">
<a href="#4a46b9f4641629031a489def4b0fc1d83d099988">
testsuite/tests/ghc-api/annotations/T10399.stdout
</a>
</li>
<li class="file-stats">
<a href="#dda3d34c53662ecea8d6db93a554833039ce70a6">
testsuite/tests/ghc-api/annotations/Test10399.hs
</a>
</li>
<li class="file-stats">
<a href="#af0155a1b21732ed0b7b8175583ce8c5176c97e9">
testsuite/tests/hiefile/should_compile/Scopes.hs
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/5d753721f9642a67d90c0a5e273b788a14163054...ec02f82f1ec46f57bbb5887cbec62c4fc8671f9f">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.



</p>
</div>
</body>
</html>