[commit: ghc] master: add -th-file which generates a th.hs file (07ace5c)

git at git.haskell.org git at git.haskell.org
Tue Jan 13 16:09:55 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/07ace5c221adbb1675413a0fac300a9f7913c234/ghc

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

commit 07ace5c221adbb1675413a0fac300a9f7913c234
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


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

07ace5c221adbb1675413a0fac300a9f7913c234
 .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.12.1-notes.xml                  |  7 ++-
 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, 227 insertions(+), 67 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 07ace5c221adbb1675413a0fac300a9f7913c234


More information about the ghc-commits mailing list