[commit: ghc] master: If pattern synonym is bidirectional and its type is some unboxed type T#, generate a worker function of type Void# -> T#, and redirect the wrapper (via a compulsory unfolding) to the worker. Fixes #9732. (7f92986)

git at git.haskell.org git at git.haskell.org
Thu Nov 13 15:41:06 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7f929862388afd54043d59b37f2f5375c5315344/ghc

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

commit 7f929862388afd54043d59b37f2f5375c5315344
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date:   Sat Nov 8 18:38:12 2014 +0800

    If pattern synonym is bidirectional and its type is some unboxed type T#,
    generate a worker function of type Void# -> T#, and redirect the wrapper
    (via a compulsory unfolding) to the worker. Fixes #9732.


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

7f929862388afd54043d59b37f2f5375c5315344
 compiler/basicTypes/PatSyn.lhs                     |  50 +++++++--
 compiler/ghc.mk                                    |   1 +
 compiler/iface/BuildTyCl.lhs                       |   2 +-
 compiler/iface/IfaceSyn.lhs                        |  10 +-
 compiler/iface/MkIface.lhs                         |   4 +-
 compiler/iface/TcIface.lhs                         |  62 +++++++++--
 compiler/typecheck/TcBinds.lhs                     |   8 +-
 compiler/typecheck/TcPatSyn.lhs                    | 119 +++++++++++----------
 compiler/typecheck/TcPatSyn.lhs-boot               |   4 +-
 testsuite/.gitignore                               |   1 +
 testsuite/tests/patsyn/should_compile/T9732.hs     |   4 +
 testsuite/tests/patsyn/should_compile/all.T        |   1 +
 testsuite/tests/patsyn/should_fail/all.T           |   1 +
 .../{unboxed-bind.hs => unboxed-wrapper-naked.hs}  |   6 +-
 .../should_fail/unboxed-wrapper-naked.stderr       |   3 +
 testsuite/tests/patsyn/should_run/all.T            |   2 +
 testsuite/tests/patsyn/should_run/match-unboxed.hs |  21 ++++
 .../should_run/match-unboxed.stdout}               |   2 +
 .../tests/patsyn/should_run/unboxed-wrapper.hs     |   9 ++
 .../should_run/unboxed-wrapper.stdout}             |   0
 20 files changed, 219 insertions(+), 91 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 7f929862388afd54043d59b37f2f5375c5315344


More information about the ghc-commits mailing list