If pattern synonym is bidirectional and its type is some unboxed type T#,
authorDr. ERDI Gergo <gergo@erdi.hu>
Sat, 8 Nov 2014 10:38:12 +0000 (18:38 +0800)
committerDr. ERDI Gergo <gergo@erdi.hu>
Thu, 13 Nov 2014 15:38:39 +0000 (23:38 +0800)
commit7f929862388afd54043d59b37f2f5375c5315344
tree4764928977cbf5f575fa1607f9da971c032361a4
parent745c4c0e04168ce2eac1e8f81a45326ecef401e4
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.
20 files changed:
compiler/basicTypes/PatSyn.lhs
compiler/ghc.mk
compiler/iface/BuildTyCl.lhs
compiler/iface/IfaceSyn.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/typecheck/TcBinds.lhs
compiler/typecheck/TcPatSyn.lhs
compiler/typecheck/TcPatSyn.lhs-boot
testsuite/.gitignore
testsuite/tests/patsyn/should_compile/T9732.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T
testsuite/tests/patsyn/should_fail/all.T
testsuite/tests/patsyn/should_fail/unboxed-wrapper-naked.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/unboxed-wrapper-naked.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_run/all.T
testsuite/tests/patsyn/should_run/match-unboxed.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_run/match-unboxed.stdout [new file with mode: 0644]
testsuite/tests/patsyn/should_run/unboxed-wrapper.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_run/unboxed-wrapper.stdout [new file with mode: 0644]