[commit: ghc] wip/T9732: 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. (9d9b615)

git at git.haskell.org git at git.haskell.org
Wed Nov 12 11:06:59 UTC 2014


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

On branch  : wip/T9732
Link       : http://ghc.haskell.org/trac/ghc/changeset/9d9b615c068a4eed11e7eb0ad6470dd5d97b9081/ghc

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

commit 9d9b615c068a4eed11e7eb0ad6470dd5d97b9081
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.


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

9d9b615c068a4eed11e7eb0ad6470dd5d97b9081
 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 9d9b615c068a4eed11e7eb0ad6470dd5d97b9081


More information about the ghc-commits mailing list