[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. (f82543c)

git at git.haskell.org git at git.haskell.org
Thu Nov 13 10:53:14 UTC 2014


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

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

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

commit f82543cbf83696a6c715ae61b5fd66b663d3ef17
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.


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

f82543cbf83696a6c715ae61b5fd66b663d3ef17
 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 f82543cbf83696a6c715ae61b5fd66b663d3ef17


More information about the ghc-commits mailing list