[commit: ghc] master: Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382. (28257ca)

git at git.haskell.org git at git.haskell.org
Sat May 9 08:25:15 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/28257cae77023f2ccc4cc1c0cd1fbbd329947a00/ghc

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

commit 28257cae77023f2ccc4cc1c0cd1fbbd329947a00
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Mon May 4 16:10:05 2015 -0700

    Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382.
    
    Summary:
    This commit adds stage 1 support for Template Haskell
    quoting, e.g. [| ... expr ... |], which is useful
    for authors of quasiquoter libraries that do not actually
    need splices.  The TemplateHaskell extension now does not
    unconditionally fail; it only fails if the renamer encounters
    a splice that it can't run.
    
    In order to make sure the referenced data structures
    are consistent, template-haskell is now a boot library.
    
    In the following patches, there are:
    
        - A few extra safety checks which should be enabled
          in stage1
        - Separation of the th/ testsuite into quotes/ which
          can be run on stage1
    
    Note for reviewer: big diff changes are simply code
    being moved out of an ifdef; there was no other substantive
    change to that code.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: simonpj, austin, goldfire
    
    Subscribers: bgamari, thomie
    
    Differential Revision: https://phabricator.haskell.org/D876
    
    GHC Trac Issues: #10382


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

28257cae77023f2ccc4cc1c0cd1fbbd329947a00
 compiler/deSugar/DsExpr.hs        |   8 --
 compiler/ghc.cabal.in             |   4 +-
 compiler/main/DynFlags.hs         |  27 +---
 compiler/main/HscMain.hs          |   4 +-
 compiler/rename/RnSplice.hs       | 295 +++++++++++++++++++-------------------
 compiler/typecheck/TcSplice.hs    | 173 +++++++++++-----------
 docs/users_guide/7.12.1-notes.xml |   7 +-
 docs/users_guide/glasgow_exts.xml |   4 +-
 ghc.mk                            |   2 +-
 mk/warnings.mk                    |   1 +
 10 files changed, 251 insertions(+), 274 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 28257cae77023f2ccc4cc1c0cd1fbbd329947a00


More information about the ghc-commits mailing list