The Backpack patch.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Sat, 10 Oct 2015 19:01:14 +0000 (12:01 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sat, 8 Oct 2016 07:20:34 +0000 (00:20 -0700)
commit00b530d5402aaa37e4085ecdcae0ae54454736c1
tree2d2963db4abdbcba9c12aea13a26e29e718e4778
parent887485a45ae55e81b26b6412b6f9dcf6a497f044
The Backpack patch.

Summary:
This patch implements Backpack for GHC.  It's a big patch but I've tried quite
hard to keep things, by-in-large, self-contained.

The user facing specification for Backpack can be found at:

    https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst

A guide to the implementation can be found at:

    https://github.com/ezyang/ghc-proposals/blob/backpack-impl/proposals/0000-backpack-impl.rst

Has a submodule update for Cabal, as well as a submodule update
for filepath to handle more strict checking of cabal-version.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: simonpj, austin, simonmar, bgamari, goldfire

Subscribers: thomie, mpickering

Differential Revision: https://phabricator.haskell.org/D1482
277 files changed:
compiler/backpack/BkpSyn.hs [new file with mode: 0644]
compiler/backpack/DriverBkp.hs [new file with mode: 0644]
compiler/backpack/NameShape.hs [new file with mode: 0644]
compiler/backpack/RnModIface.hs [new file with mode: 0644]
compiler/basicTypes/Module.hs
compiler/basicTypes/Module.hs-boot
compiler/basicTypes/Name.hs
compiler/deSugar/Desugar.hs
compiler/ghc.cabal.in
compiler/iface/IfaceEnv.hs
compiler/iface/IfaceEnv.hs-boot [new file with mode: 0644]
compiler/iface/IfaceSyn.hs
compiler/iface/LoadIface.hs
compiler/iface/LoadIface.hs-boot [new file with mode: 0644]
compiler/iface/MkIface.hs
compiler/iface/TcIface.hs
compiler/main/DriverPipeline.hs
compiler/main/DynFlags.hs
compiler/main/Finder.hs
compiler/main/GhcMake.hs
compiler/main/HscMain.hs
compiler/main/HscTypes.hs
compiler/main/PackageConfig.hs
compiler/main/PackageConfig.hs-boot [new file with mode: 0644]
compiler/main/Packages.hs
compiler/main/Packages.hs-boot
compiler/parser/Lexer.x
compiler/parser/Parser.y
compiler/rename/RnEnv.hs
compiler/rename/RnNames.hs
compiler/typecheck/Inst.hs
compiler/typecheck/TcBackpack.hs [new file with mode: 0644]
compiler/typecheck/TcEnv.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnDriver.hs-boot [new file with mode: 0644]
compiler/typecheck/TcRnMonad.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcSplice.hs
compiler/types/InstEnv.hs
compiler/utils/Outputable.hs
ghc/Main.hs
libraries/Cabal
libraries/ghc-boot/GHC/PackageDb.hs
testsuite/.gitignore
testsuite/driver/extra_files.py
testsuite/driver/testglobals.py
testsuite/driver/testlib.py
testsuite/tests/backpack/Makefile [new file with mode: 0644]
testsuite/tests/backpack/cabal/Makefile [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/Main.hs [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/Makefile [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/Setup.hs [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/all.T [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/bkpcabal01.cabal [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/bkpcabal01.stdout [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/impl/H.hs [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/impl/I.hs [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/p/H.hsig [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/p/P.hs.in1 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/p/P.hs.in2 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/q/I.hsig [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/q/Q.hs.in1 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal01/q/Q.hs.in2 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/Makefile [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/Setup.hs [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/all.T [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/bkpcabal02.cabal [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/bkpcabal02.stderr [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/bkpcabal02.stdout [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/p/.gitignore [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/p/H.hsig.in1 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/p/H.hsig.in2 [new file with mode: 0644]
testsuite/tests/backpack/cabal/bkpcabal02/q/H.hsig [new file with mode: 0644]
testsuite/tests/backpack/reexport/Makefile [new file with mode: 0644]
testsuite/tests/backpack/reexport/all.T [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex01.bkp [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex01.stderr [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex02.bkp [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex02.stderr [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex03.bkp [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex03.stderr [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex04.bkp [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex04.stderr [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex05.bkp [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex06.bkp [new file with mode: 0644]
testsuite/tests/backpack/reexport/bkpreex06.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/Makefile [new file with mode: 0644]
testsuite/tests/backpack/should_compile/all.T [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp01.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp01.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp01.stdout [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp01c.stdout [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp02.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp02.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp02.stdout [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp03.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp04.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp05.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp06.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp07.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp07.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp08.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp08.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp09.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp09.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp10.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp10.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp11.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp11.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp12.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp12.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp13.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp14.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp14.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp15.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp15.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp16.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp16.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp17.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp17.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp18.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp18.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp19.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp19.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp20.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp20.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp21.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp21.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp22.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp23.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp23.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp24.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp24.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp25.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp25.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp26.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp26.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp27.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp27.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp28.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp28.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp29.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp29.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp30.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp30.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp31.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp31.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp32.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp32.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp33.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp33.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp34.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp34.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp35.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp36.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_compile/bkp36.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/Makefile [new file with mode: 0644]
testsuite/tests/backpack/should_fail/all.T [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail01.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail01.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail03.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail03.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail04.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail04.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail05.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail05.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail06.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail06.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail07.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail07.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail09.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail09.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail10.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail10.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail11.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail11.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail12.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail12.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail13.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail13.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail14.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail14.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail15.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail16.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail16.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail17.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail17.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail18.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail18.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail19.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail19.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail20.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail20.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail21.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail21.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail22.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_fail/bkpfail22.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_run/Makefile [new file with mode: 0644]
testsuite/tests/backpack/should_run/all.T [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun01.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun01.stdout [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun02.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun02.stdout [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun03.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun03.stdout [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun04.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun04.stdout [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun05.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun05.stderr [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun05.stdout [moved from testsuite/tests/driver/sigof02/sigof02.stdout with 100% similarity]
testsuite/tests/backpack/should_run/bkprun06.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun06.stdout [moved from testsuite/tests/driver/sigof02/sigof02d.stdout with 100% similarity]
testsuite/tests/backpack/should_run/bkprun07.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun07.stdout [moved from testsuite/tests/driver/sigof01/sigof01.stdout with 100% similarity]
testsuite/tests/backpack/should_run/bkprun08.bkp [new file with mode: 0644]
testsuite/tests/backpack/should_run/bkprun08.stdout [new file with mode: 0644]
testsuite/tests/cabal/cabal03/cabal03.stderr
testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile
testsuite/tests/driver/dynamicToo/dynamicToo005/dynamicToo005.bkp [new file with mode: 0644]
testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig [deleted file]
testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs [deleted file]
testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile [deleted file]
testsuite/tests/driver/dynamicToo/dynamicToo006/test.T [deleted file]
testsuite/tests/driver/recomp005/recomp005.stdout
testsuite/tests/driver/sigof01/A.hs [deleted file]
testsuite/tests/driver/sigof01/B.hsig [deleted file]
testsuite/tests/driver/sigof01/Main.hs [deleted file]
testsuite/tests/driver/sigof01/Makefile [deleted file]
testsuite/tests/driver/sigof01/all.T [deleted file]
testsuite/tests/driver/sigof01/sigof01m.stdout [deleted file]
testsuite/tests/driver/sigof02/Double.hs [deleted file]
testsuite/tests/driver/sigof02/Main.hs [deleted file]
testsuite/tests/driver/sigof02/Makefile [deleted file]
testsuite/tests/driver/sigof02/Map.hsig [deleted file]
testsuite/tests/driver/sigof02/MapAsSet.hsig [deleted file]
testsuite/tests/driver/sigof02/all.T [deleted file]
testsuite/tests/driver/sigof02/sigof02.stderr [deleted file]
testsuite/tests/driver/sigof02/sigof02dm.stdout [deleted file]
testsuite/tests/driver/sigof02/sigof02dmt.stderr [deleted file]
testsuite/tests/driver/sigof02/sigof02dmt.stdout [deleted file]
testsuite/tests/driver/sigof02/sigof02dt.stderr [deleted file]
testsuite/tests/driver/sigof02/sigof02m.stderr [deleted file]
testsuite/tests/driver/sigof02/sigof02m.stdout [deleted file]
testsuite/tests/driver/sigof02/sigof02mt.stdout [deleted file]
testsuite/tests/driver/sigof03/A.hs [deleted file]
testsuite/tests/driver/sigof03/ASig1.hsig [deleted file]
testsuite/tests/driver/sigof03/ASig2.hsig [deleted file]
testsuite/tests/driver/sigof03/Main.hs [deleted file]
testsuite/tests/driver/sigof03/Makefile [deleted file]
testsuite/tests/driver/sigof03/all.T [deleted file]
testsuite/tests/driver/sigof04/Makefile [deleted file]
testsuite/tests/driver/sigof04/Sig.hsig [deleted file]
testsuite/tests/driver/sigof04/all.T [deleted file]
testsuite/tests/driver/sigof04/sigof04.stderr [deleted file]
testsuite/tests/ghci/scripts/T5979.stderr
testsuite/tests/haddock/haddock_examples/haddock.Test.stderr
testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr
testsuite/tests/package/package07e.stderr
testsuite/tests/package/package08e.stderr
testsuite/tests/perf/haddock/all.T
testsuite/tests/plugins/T11244.stderr
testsuite/tests/safeHaskell/check/Check07.stderr
testsuite/tests/safeHaskell/check/Check08.stderr
testsuite/tests/safeHaskell/safeLanguage/SafeLang12.stderr
testsuite/tests/typecheck/should_compile/all.T
testsuite/tests/typecheck/should_compile/tc264.hsig [deleted file]
testsuite/tests/typecheck/should_fail/T6018fail.stderr
testsuite/tests/typecheck/should_fail/all.T
testsuite/tests/typecheck/should_fail/tcfail219.hsig [deleted file]
testsuite/tests/typecheck/should_fail/tcfail219.stderr [deleted file]
testsuite/tests/typecheck/should_fail/tcfail220.hsig [deleted file]
testsuite/tests/typecheck/should_fail/tcfail220.stderr [deleted file]
testsuite/tests/typecheck/should_fail/tcfail221.hsig [deleted file]
testsuite/tests/typecheck/should_fail/tcfail221.stderr [deleted file]
testsuite/tests/typecheck/should_fail/tcfail222.hsig [deleted file]
testsuite/tests/typecheck/should_fail/tcfail222.stderr [deleted file]
utils/ghc-pkg/Main.hs