[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. (3cb2a48)
git at git.haskell.org
git at git.haskell.org
Wed Nov 12 09:38:04 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9732
Link : http://ghc.haskell.org/trac/ghc/changeset/3cb2a48e1b6fc761ad61afb201b191d7f0c6e10c/ghc
>---------------------------------------------------------------
commit 3cb2a48e1b6fc761ad61afb201b191d7f0c6e10c
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.
>---------------------------------------------------------------
3cb2a48e1b6fc761ad61afb201b191d7f0c6e10c
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 3cb2a48e1b6fc761ad61afb201b191d7f0c6e10c
More information about the ghc-commits
mailing list