[Git][ghc/ghc][wip/az/exactprint] 14 commits: Document backpack fields in DynFlags
Alan Zimmerman
gitlab at gitlab.haskell.org
Thu Apr 30 21:27:46 UTC 2020
Alan Zimmerman pushed to branch wip/az/exactprint at Glasgow Haskell Compiler / GHC
Commits:
2cfc4ab9 by Sylvain Henry at 2020-04-30T01:56:56-04:00
Document backpack fields in DynFlags
- - - - -
10a2ba90 by Sylvain Henry at 2020-04-30T01:56:56-04:00
Refactor UnitInfo
* Rename InstalledPackageInfo into GenericUnitInfo
The name InstalledPackageInfo is only kept for alleged backward
compatibility reason in Cabal. ghc-boot has its own stripped down copy
of this datatype but it doesn't need to keep the name. Internally we
already use type aliases (UnitInfo in GHC, PackageCacheFormat in
ghc-pkg).
* Rename UnitInfo fields: add "unit" prefix and fix misleading names
* Add comments on every UnitInfo field
* Rename SourcePackageId into PackageId
"Package" already indicates that it's a "source package". Installed
package components are called units.
Update Haddock submodule
- - - - -
69562e34 by Sylvain Henry at 2020-04-30T01:56:56-04:00
Remove unused `emptyGenericUnitInfo`
- - - - -
9e2c8e0e by Sylvain Henry at 2020-04-30T01:56:56-04:00
Refactor UnitInfo load/store from databases
Converting between UnitInfo stored in package databases and UnitInfo as
they are used in ghc-pkg and ghc was done in a very convoluted way (via
BinaryStringRep and DbUnitModuleRep type classes using fun deps, etc.).
It was difficult to understand and even more to modify (I wanted to
try to use a GADT for UnitId but fun deps got in the way).
The new code uses much more straightforward functions to convert between
the different representations. Much simpler.
- - - - -
ea717aa4 by Sylvain Henry at 2020-04-30T01:56:56-04:00
Factorize mungePackagePaths code
This patch factorizes the duplicated code used in ghc-pkg and in GHC to
munge package paths/urls.
It also fixes haddock-html munging in GHC (allowed to be either a file
or a url) to mimic ghc-pkg behavior.
- - - - -
10d15f1e by Sylvain Henry at 2020-04-30T01:56:56-04:00
Refactoring unit management code
Over the years the unit management code has been modified a lot to keep
up with changes in Cabal (e.g. support for several library components in
the same package), to integrate BackPack, etc. I found it very hard to
understand as the terminology wasn't consistent, was referring to past
concepts, etc.
The terminology is now explained as clearly as I could in the Note
"About Units" and the code is refactored to reflect it.
-------------------
Many names were misleading: UnitId is not an Id but could be a virtual
unit (an indefinite one instantiated on the fly), IndefUnitId
constructor may contain a definite instantiated unit, etc.
* Rename IndefUnitId into InstantiatedUnit
* Rename IndefModule into InstantiatedModule
* Rename UnitId type into Unit
* Rename IndefiniteUnitId constructor into VirtUnit
* Rename DefiniteUnitId constructor into RealUnit
* Rename packageConfigId into mkUnit
* Rename getPackageDetails into unsafeGetUnitInfo
* Rename InstalledUnitId into UnitId
Remove references to misleading ComponentId: a ComponentId is just an
indefinite unit-id to be instantiated.
* Rename ComponentId into IndefUnitId
* Rename ComponentDetails into UnitPprInfo
* Fix display of UnitPprInfo with empty version: this is now used for
units dynamically generated by BackPack
Generalize several types (Module, Unit, etc.) so that they can be used
with different unit identifier types: UnitKey, UnitId, Unit, etc.
* GenModule: Module, InstantiatedModule and InstalledModule are now
instances of this type
* Generalize DefUnitId, IndefUnitId, Unit, InstantiatedUnit,
PackageDatabase
Replace BackPack fake "hole" UnitId by a proper HoleUnit constructor.
Add basic support for UnitKey. They should be used more in the future to
avoid mixing them up with UnitId as we do now.
Add many comments.
Update Haddock submodule
- - - - -
8bfb0219 by Sylvain Henry at 2020-04-30T01:56:56-04:00
Unit: split and rename modules
Introduce GHC.Unit.* hierarchy for everything concerning units, packages
and modules.
Update Haddock submodule
- - - - -
71484b09 by Alexis King at 2020-04-30T01:57:35-04:00
Allow block arguments in arrow control operators
Arrow control operators have their own entries in the grammar, so they
did not cooperate with BlockArguments. This was just a minor oversight,
so this patch adjusts the grammar to add the desired behavior.
fixes #18050
- - - - -
a48cd2a0 by Alexis King at 2020-04-30T01:57:35-04:00
Allow LambdaCase to be used as a command in proc notation
- - - - -
f4d3773c by Alexis King at 2020-04-30T01:57:35-04:00
Document BlockArguments/LambdaCase support in arrow notation
- - - - -
5bdfdd13 by Simon Peyton Jones at 2020-04-30T01:58:15-04:00
Add tests for #17873
- - - - -
19b701c2 by Simon Peyton Jones at 2020-04-30T07:30:13-04:00
Mark rule args as non-tail-called
This was just an omission...b I'd failed to call markAllNonTailCall on
rule args. I think this bug has been here a long time, but it's quite
hard to trigger.
Fixes #18098
- - - - -
014ef4a3 by Matthew Pickering at 2020-04-30T07:30:50-04:00
Hadrian: Improve tool-args command to support more components
There is a new command to hadrian, tool:path/to/file.hs, which returns
the options needed to compile that file in GHCi.
This is now used in the ghci script with argument `ghc/Main.hs` but its
main purpose is to support the new multi-component branch of ghcide.
- - - - -
3bf7e695 by Alan Zimmerman at 2020-04-30T22:27:10+01:00
Proof of Concept implementation of in-tree API Annotations
This MR introduces a possible machinery to introduce API Annotations
into the TTG extension points.
It is intended to be a concrete example for discussion.
It still needs to process comments.
----
Work in progress, adding more TTG extensions for annotations.
And fixing ppr round-trip tests by being able to blank out in-tree
annotations, as done with SrcSpans.
This is needed for the case of
class Foo a where
for which current ppr does not print the "where".
Rename AA to AddApiAnn and AA to AddAnn
Add XConPatIn and XConPatOut
Rebase
----
First pass at bringing in LocatedA for API anns in locations
Treatment of ECP in parsing is provisional at this stage, leads to some
horribly stuff in Parser.y and RdrHsSyn.
It is an extensive but not invasive change. I think (AZ).
Locally it reports some parsing tests using less memory.
Add ApiAnns to the HsExpr data structure.
rebase.
Change HsMatchContext and HsStmtContext to use an id, not a GhcPass
parameter.
Add ApiAnns to Hs/Types
Rebase
Rebased 2020-03-25
WIP on in-tree annotations
Includes updating HsModule
Imports
LocateA ImportDecl so we can hang AnnSemi off it
A whole bunch of stuff more
InjectivityAnn and FamEqn now have annotations in them
Add annotations to context srcspan
----
In-tree annotations: LHsDecl and LHsBind LocatedA
----
WIP on in-tree annotations
----
in-tree annotations: LHsType is now LocatedA
----
FunDeps is now also a HS data type
----
WIP. Added LocatedA to Pat, Expr, Decl
And worked some more through Parser.y
----
LStmt now Located
----
Finished working through Parser.y, tests seem ok
failures relate to annotations.
- - - - -
30 changed files:
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Names.hs-boot
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/DebugBlock.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/Config.hs
- compiler/GHC/CmmToAsm/Dwarf.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/PIC.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/Opt/Driver.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/TyCon.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b15868a8f81ad7578cbf3d784345cf603239a130...3bf7e69555e7136d00f2dcf145d281916558e859
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b15868a8f81ad7578cbf3d784345cf603239a130...3bf7e69555e7136d00f2dcf145d281916558e859
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/20200430/f07502e8/attachment.html>
More information about the ghc-commits
mailing list