Move Extension type to ghc-boot-th
ClosedPublic

Authored by bgamari on May 16 2016, 2:13 AM.

Details

Summary

This creates a new package, ghc-boot-th, to contain the Extension
type, which now lives in GHC.LanguageExtension.Type. This ensures that
the transitive dependency set of the template-haskell package remains
minimal.

The GHC.LanguageExtensions.Type module is also re-exported by
ghc-boot, which provides an orphan binary instance as well.

Test Plan

Validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bgamari updated this revision to Diff 7595.May 16 2016, 2:13 AM
bgamari retitled this revision from to Move Extension type to ghc-boot-th.
bgamari updated this object.
bgamari edited the test plan for this revision. (Show Details)
bgamari added a reviewer: hvr.
bgamari added a subscriber: ezyang.
bgamari updated this revision to Diff 7596.May 16 2016, 2:14 AM
bgamari edited edge metadata.

Fix long lines

bgamari updated this revision to Diff 7597.May 16 2016, 2:17 AM
bgamari edited edge metadata.

Move Lexeme as well

bgamari updated this revision to Diff 7598.May 16 2016, 2:19 AM
bgamari edited edge metadata.

More fixes

bgamari updated this revision to Diff 7599.May 16 2016, 2:21 AM
bgamari edited edge metadata.

Add missing dep

bgamari updated this revision to Diff 7600.May 16 2016, 3:05 AM
bgamari edited edge metadata.

It works

hvr awarded a token.May 16 2016, 3:12 AM
bgamari updated this revision to Diff 7601.May 16 2016, 3:14 AM
bgamari edited edge metadata.

Reexport GHC.LanguageExtensions.Type from ghc-boot

hvr requested changes to this revision.May 16 2016, 3:23 AM
hvr edited edge metadata.

this brings us back to the same template-haskell deps 7.10 had?

libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
16–21

I'd add a note here explaining the orphan-situation

This revision now requires changes to proceed.May 16 2016, 3:23 AM
bgamari updated this revision to Diff 7604.May 16 2016, 5:42 AM
bgamari edited edge metadata.

Add comment explaining orphan situation

bgamari marked an inline comment as done.May 16 2016, 5:43 AM
In D2224#64299, @hvr wrote:

this brings us back to the same template-haskell deps 7.10 had?

Yes, template-haskell now depends only upon base, ghc-boot-th, and pretty. ghc-boot-th depends only upon base.

thomie accepted this revision.May 16 2016, 6:55 AM
thomie added a reviewer: thomie.

LGTM

Hadrian might need updating.

https://ghc.haskell.org/trac/ghc/wiki/Commentary/Libraries/VersionHistory needs an update after this.

RyanGlScott added inline comments.
libraries/ghc-boot/ghc-boot.cabal.in
44

Is there a reason that GHC.LanguageExtensions.Types is reexported but not GHC.Lexeme? I ask since this Diff, as-is, would break one of my projects unless GHC.Lexeme remains accessible from ghc-boot.

bgamari updated this revision to Diff 7608.May 16 2016, 7:35 AM
bgamari edited edge metadata.

Re-export GHC.Lexeme from ghc-boot

bgamari marked an inline comment as done.May 16 2016, 7:35 AM
bgamari updated this revision to Diff 7612.May 16 2016, 8:00 AM
bgamari edited edge metadata.

Fix Cabal file syntax

hvr added inline comments.May 16 2016, 8:08 AM
libraries/ghc-boot-th/GNUmakefile
1 ↗(On Diff #7612)

does GNUmakefile work for non-GNU make?

hvr requested changes to this revision.May 16 2016, 8:10 AM
hvr edited edge metadata.
hvr added inline comments.
libraries/ghc-boot-th/changelog.md
3

this needs updating to 8.0.1

libraries/ghc-boot/changelog.md
7

merge with 8.0.1 entry

9

8.0.1

This revision now requires changes to proceed.May 16 2016, 8:10 AM
bgamari added inline comments.May 16 2016, 8:12 AM
libraries/ghc-boot-th/GNUmakefile
1 ↗(On Diff #7612)

Nope, but that's okay as we require GNU make.

libraries/ghc-boot-th/changelog.md
3

Indeed it does.

bgamari updated this revision to Diff 7613.May 16 2016, 8:17 AM
bgamari edited edge metadata.

Update changelogs

bgamari marked 6 inline comments as done.May 16 2016, 8:18 AM
hvr accepted this revision.May 16 2016, 8:38 AM
hvr edited edge metadata.
This revision is now accepted and ready to land.May 16 2016, 8:38 AM
This revision was automatically updated to reflect the committed changes.