[commit: ghc] master: Template Haskell support for unboxed sums (613d745)

git at git.haskell.org git at git.haskell.org
Tue Aug 23 20:34:26 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/613d745523f181991f6f916bbe58082b7970f7e6/ghc

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

commit 613d745523f181991f6f916bbe58082b7970f7e6
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Tue Aug 23 14:20:36 2016 -0400

    Template Haskell support for unboxed sums
    
    This adds new constructors `UnboxedSumE`, `UnboxedSumT`, and
    `UnboxedSumP` to represent unboxed sums in Template Haskell.
    
    One thing you can't currently do is, e.g., `reify ''(#||#)`, since I
    don't believe unboxed sum type/data constructors can be written in
    prefix form.  I will look at fixing that as part of #12514.
    
    Fixes #12478.
    
    Test Plan: make test TEST=T12478_{1,2,3}
    
    Reviewers: osa1, goldfire, austin, bgamari
    
    Reviewed By: goldfire, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2448
    
    GHC Trac Issues: #12478


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

613d745523f181991f6f916bbe58082b7970f7e6
 compiler/deSugar/DsMeta.hs                         |  29 +++++
 compiler/hsSyn/Convert.hs                          |  34 ++++++
 compiler/prelude/THNames.hs                        | 122 +++++++++++----------
 compiler/typecheck/TcSplice.hs                     |   3 +-
 docs/users_guide/8.2.1-notes.rst                   |   2 +
 libraries/template-haskell/Language/Haskell/TH.hs  |  11 +-
 .../template-haskell/Language/Haskell/TH/Lib.hs    |  13 +++
 .../template-haskell/Language/Haskell/TH/Ppr.hs    |  29 +++--
 .../template-haskell/Language/Haskell/TH/Syntax.hs |  58 ++++++----
 libraries/template-haskell/changelog.md            |   2 +
 .../tests/th/{T10697_decided_1.hs => T12478_1.hs}  |   5 +-
 testsuite/tests/th/T12478_1.stdout                 |   1 +
 testsuite/tests/th/T12478_2.hs                     |  20 ++++
 .../should_run/T3279.stdout => th/T12478_2.stdout} |   0
 testsuite/tests/th/T12478_3.hs                     |  14 +++
 testsuite/tests/th/T12478_4.hs                     |   8 ++
 testsuite/tests/th/T12478_4.stderr                 |   6 +
 testsuite/tests/th/all.T                           |   5 +
 18 files changed, 267 insertions(+), 95 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 613d745523f181991f6f916bbe58082b7970f7e6


More information about the ghc-commits mailing list