[Git][ghc/ghc][wip/T18234] 9 commits: Add info about typeclass evidence to .hie files

Ben Gamari gitlab at gitlab.haskell.org
Wed May 27 19:35:17 UTC 2020



Ben Gamari pushed to branch wip/T18234 at Glasgow Haskell Compiler / GHC


Commits:
53814a64 by Zubin Duggal at 2020-05-26T03:03:24-04:00
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

- - - - -
6604906c by Sebastian Graf at 2020-05-26T03:04:04-04:00
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.

- - - - -
cf772f19 by Sylvain Henry at 2020-05-26T03:04:45-04:00
Enhance Note [About units] for Backpack

- - - - -
ede24126 by Takenobu Tani at 2020-05-27T00:13:55-04:00
core-spec: Modify file paths according to new module hierarchy

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]

- - - - -
04750304 by Ben Gamari at 2020-05-27T00:14:33-04:00
eventlog: Fix racy flushing

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.

- - - - -
d6203f24 by Joshua Price at 2020-05-27T00:15:17-04:00
Make `identifier` parse unparenthesized `->` (#18060)

- - - - -
b20d8fc9 by Ben Gamari at 2020-05-27T15:28:29-04:00
gitlab-ci: Add usage message to ci.sh

- - - - -
65c75d5d by Ben Gamari at 2020-05-27T15:34:26-04:00
gitlab-ci: Make names more consistent

- - - - -
e5a0d8a5 by Ben Gamari at 2020-05-27T15:34:58-04:00
gitlab-ci: Introduce a nightly cross-compilation job

This adds a job to test cross-compilation from x86-64 to AArch64 with
Hadrian.

Fixes #18234.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Binary.hs
- compiler/GHC/Iface/Ext/Debug.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Parser.y
- compiler/GHC/Unit.hs
- docs/core-spec/CoreLint.ott
- docs/core-spec/CoreSyn.ott
- docs/core-spec/README
- docs/core-spec/core-spec.mng
- docs/core-spec/core-spec.pdf
- docs/users_guide/runtime_control.rst
- docs/users_guide/using-optimisation.rst
- includes/rts/EventLogWriter.h
- rts/eventlog/EventLogWriter.c
- + testsuite/tests/ghci/T18060/T18060.script
- + testsuite/tests/ghci/T18060/T18060.stdout
- + testsuite/tests/ghci/T18060/all.T
- testsuite/tests/hiefile/should_compile/Scopes.hs
- + testsuite/tests/hiefile/should_run/HieQueries.hs
- + testsuite/tests/hiefile/should_run/HieQueries.stdout
- testsuite/tests/hiefile/should_run/PatTypes.hs
- testsuite/tests/hiefile/should_run/all.T
- + testsuite/tests/stranal/should_compile/T18122.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/03a84b671c83a514c84bfe629e3dcb90c48c1d98...e5a0d8a5536c0db649642044a33c0d73e6c28e62

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/03a84b671c83a514c84bfe629e3dcb90c48c1d98...e5a0d8a5536c0db649642044a33c0d73e6c28e62
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/20200527/d3eb8e96/attachment-0001.html>


More information about the ghc-commits mailing list