[commit: ghc] ghc-7.10: add -th-file which generates a th.hs file (dfb2b5d)

git at git.haskell.org git at git.haskell.org
Mon Jan 19 13:58:14 UTC 2015


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

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/dfb2b5d0f00e4bd5c0ed2af9a24eaf264c4166a9/ghc

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

commit dfb2b5d0f00e4bd5c0ed2af9a24eaf264c4166a9
Author: Greg Weber <greg at gregweber.info>
Date:   Mon Jan 12 05:16:37 2015 -0600

    add -th-file which generates a th.hs file
    
    Summary:
    see Trac #8624
    
    similar functionality is now available
    with -ddump-to-file -ddump-splices
    
    However, users are already accustomed to -ddump-splices
    having a particular format, and this format is not completely valid code
    The goal of -th-file is to dump valid Haskell code
    
    Additionally, the convention of -ddump-to-file is to name the file after
    the flag, so the file is .dump-splices
    Given that the goal of the new flag is to generate valid Haskell,
    The extension should be .hs
    
    Additionally, -ddump-to-file effects all other dump flags
    
    Test Plan:
    look at the output of using the -th-file flag
    and compare it to the output of using -ddump-to-file and -ddump-splices
    I want to add test cases, but just need some pointers on getting started there
    
    Reviewers: thomie, goldfire, simonpj, austin
    
    Reviewed By: simonpj, austin
    
    Subscribers: thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D518
    
    GHC Trac Issues: #8624
    
    (cherry picked from commit 07ace5c221adbb1675413a0fac300a9f7913c234)
    
    Conflicts:
    	docs/users_guide/7.12.1-notes.xml


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

dfb2b5d0f00e4bd5c0ed2af9a24eaf264c4166a9
 .gitignore                                         |  8 +++
 compiler/main/DynFlags.hs                          |  4 ++
 compiler/main/ErrUtils.hs                          |  3 +-
 compiler/rename/RnSplice.hs                        | 63 +++++++++++++++++++---
 compiler/typecheck/TcRnDriver.hs                   | 11 ++--
 compiler/typecheck/TcRnMonad.hs                    | 11 ++--
 compiler/typecheck/TcSplice.hs                     | 63 ++++++++++++++++++----
 compiler/typecheck/TcSplice.hs-boot                | 14 ++++-
 docs/users_guide/7.10.1-notes.xml                  | 17 ++++++
 docs/users_guide/flags.xml                         |  6 +++
 docs/users_guide/glasgow_exts.xml                  | 42 +++++++++++++--
 .../tests/indexed-types/should_fail/T8129.stdout   |  1 -
 testsuite/tests/th/Makefile                        |  6 +++
 testsuite/tests/th/T3319.stderr                    |  3 +-
 testsuite/tests/th/T3600.stderr                    |  3 +-
 testsuite/tests/th/T5217.stderr                    |  3 +-
 testsuite/tests/th/T5290.stderr                    |  3 +-
 testsuite/tests/th/T5700.stderr                    |  3 +-
 testsuite/tests/th/T5883.stderr                    |  3 +-
 testsuite/tests/th/T5984.stderr                    |  6 +--
 testsuite/tests/th/T7532.stderr                    |  3 +-
 testsuite/tests/th/T8624.hs                        |  7 +++
 .../tests/th/T8624.stderr                          |  0
 testsuite/tests/th/T8624.stdout                    |  2 +
 testsuite/tests/th/TH_TyInstWhere1.stderr          |  3 +-
 .../tests/th/TH_foreignCallingConventions.stderr   |  3 +-
 testsuite/tests/th/TH_foreignInterruptible.stderr  |  3 +-
 testsuite/tests/th/TH_genEx.stderr                 |  3 +-
 testsuite/tests/th/TH_pragma.stderr                |  6 +--
 testsuite/tests/th/all.T                           |  1 +
 30 files changed, 239 insertions(+), 65 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 dfb2b5d0f00e4bd5c0ed2af9a24eaf264c4166a9


More information about the ghc-commits mailing list