[commit: ghc] master: Unify hsig and hs-boot; add preliminary "hs-boot" merging. (06d46b1)

git at git.haskell.org git at git.haskell.org
Mon Sep 21 18:53:01 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/06d46b1e4507e09eb2a7a04998a92610c8dc6277/ghc

>---------------------------------------------------------------

commit 06d46b1e4507e09eb2a7a04998a92610c8dc6277
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Fri Jul 24 15:13:49 2015 -0700

    Unify hsig and hs-boot; add preliminary "hs-boot" merging.
    
    This patch drops the file level distinction between hs-boot and hsig;
    we figure out which one we are compiling based on whether or not there
    is a corresponding hs file lying around.
    
    To make the "import A" syntax continue to work for bare hs-boot
    files, we also introduce hs-boot merging, which takes an A.hi-boot
    and converts it to an A.hi when there is no A.hs file in scope.
    This will be generalized in Backpack to merge multiple A.hi files together;
    which means we can jettison the "load multiple interface files" functionality.
    
    This works automatically for --make, but for one-shot compilation
    we need a new mode: ghc --merge-requirements A will generate an A.hi/A.o
    from a local A.hi-boot file; Backpack will extend this mechanism further.
    
    Has Haddock submodule update to deal with change in msHsFilePath behavior.
    
        - This commit drops support for the hsig extension. Can
          we support it?  It's annoying because the finder code is
          written with the assumption that where there's an hs-boot
          file, there's always an hs file too.  To support hsig, you'd
          have to probe two locations.  Easier to just not support it.
    
        - #10333 affects us, modifying an hs-boot still doesn't trigger
          recomp.
    
        - See compiler/main/Finder.hs: this diff is very skeevy, but
          it seems to work.
    
        - This code cunningly doesn't drop hs-boot files from the
          "drop hs-boot files" module graph, if they don't have a
          corresponding hs file.  I have no idea if this actually is useful.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: simonpj, austin, bgamari, spinda
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1098


>---------------------------------------------------------------

06d46b1e4507e09eb2a7a04998a92610c8dc6277
 compiler/deSugar/Desugar.hs                        |   2 +-
 compiler/iface/LoadIface.hs                        |   2 +-
 compiler/iface/MkIface.hs                          |  47 +++-
 compiler/main/DriverMkDepend.hs                    |   6 +-
 compiler/main/DriverPhases.hs                      |  80 +++----
 compiler/main/DriverPipeline.hs                    | 248 ++++++++++++++-------
 compiler/main/Finder.hs                            |   8 +-
 compiler/main/GHC.hs                               |   2 +-
 compiler/main/GhcMake.hs                           | 103 ++++++---
 compiler/main/HscMain.hs                           |  95 +++++++-
 compiler/main/HscTypes.hs                          |  40 ++--
 compiler/typecheck/TcBinds.hs                      |   4 +-
 compiler/typecheck/TcInstDcls.hs                   |   4 +-
 compiler/typecheck/TcRnDriver.hs                   |  43 ++--
 compiler/typecheck/TcRnMonad.hs                    |   2 +-
 ghc/Main.hs                                        |  19 +-
 testsuite/.gitignore                               |   1 +
 .../dynamicToo005/{A005.hsig => A005.hs-boot}      |   0
 .../tests/driver/dynamicToo/dynamicToo005/Makefile |   8 +-
 .../dynamicToo/dynamicToo006/{A.hsig => A.hs-boot} |   0
 .../tests/driver/dynamicToo/dynamicToo006/Makefile |   2 +
 testsuite/tests/driver/recomp014/Makefile          |  33 +++
 testsuite/tests/driver/recomp014/all.T             |   4 +
 .../retc003.stdout => recomp014/recomp014.stdout}  |   5 +-
 .../tests/driver/sigof01/{B.hsig => B.hs-boot}     |   0
 testsuite/tests/driver/sigof01/Makefile            |   9 +-
 testsuite/tests/driver/sigof01/all.T               |  10 +
 testsuite/tests/driver/sigof01/sigof01i.script     |   1 +
 .../sigof01/{sigof01.stdout => sigof01i.stdout}    |   0
 testsuite/tests/driver/sigof01/sigof01i2.script    |   3 +
 testsuite/tests/driver/sigof01/sigof01i2.stdout    |   9 +
 testsuite/tests/driver/sigof01/sigof01m.stdout     |   7 +-
 testsuite/tests/driver/sigof02/Makefile            |  21 +-
 .../tests/driver/sigof02/{Map.hsig => Map.hs-boot} |   0
 .../sigof02/{MapAsSet.hsig => MapAsSet.hs-boot}    |   0
 testsuite/tests/driver/sigof02/sigof02dm.stdout    |   8 +-
 testsuite/tests/driver/sigof02/sigof02m.stdout     |  10 +-
 .../driver/sigof03/{ASig1.hsig => ASig1.hs-boot}   |   0
 .../driver/sigof03/{ASig2.hsig => ASig2.hs-boot}   |   0
 testsuite/tests/driver/sigof03/Makefile            |   5 +-
 testsuite/tests/driver/sigof04/Makefile            |   2 +-
 .../tests/driver/sigof04/{Sig.hsig => Sig.hs-boot} |   0
 testsuite/tests/driver/sigof04/sigof04.stderr      |   4 +-
 testsuite/tests/typecheck/should_compile/all.T     |   2 +-
 .../should_compile/{tc264.hsig => tc264.hs-boot}   |   0
 .../tests/typecheck/should_compile/tc264.stderr    |   2 +-
 testsuite/tests/typecheck/should_fail/all.T        |   8 +-
 .../{tcfail219.hsig => tcfail219.hs-boot}          |   0
 .../tests/typecheck/should_fail/tcfail219.stderr   |   5 +-
 .../{tcfail220.hsig => tcfail220.hs-boot}          |   0
 .../tests/typecheck/should_fail/tcfail220.stderr   |  10 +-
 .../{tcfail221.hsig => tcfail221.hs-boot}          |   0
 .../tests/typecheck/should_fail/tcfail221.stderr   |   8 +-
 .../{tcfail222.hsig => tcfail222.hs-boot}          |   0
 .../tests/typecheck/should_fail/tcfail222.stderr   |   6 +-
 utils/ghctags/Main.hs                              |   7 +-
 utils/haddock                                      |   2 +-
 57 files changed, 605 insertions(+), 292 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 06d46b1e4507e09eb2a7a04998a92610c8dc6277


More information about the ghc-commits mailing list