Commit 19ddd044 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Add a test case from the nested CPR work

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: thomie, carter

Differential Revision: https://phabricator.haskell.org/D4565
parent 2fdfe056
module CaseBinderCPR where
-- This example, taken from nofib's transform (and heavily reduced) ensures that
-- CPR information is added to a case binder
f_list_cmp::(t1 -> t1 -> Int) -> [t1] -> [t1] -> Int;
f_list_cmp a_cmp [] []= 0
f_list_cmp a_cmp [] a_ys= -1
f_list_cmp a_cmp a_xs []= 1
f_list_cmp a_cmp (a_x:a_xs) (a_y:a_ys)=
if r_order == 0
then f_list_cmp a_cmp a_xs a_ys
else r_order
where
r_order = a_cmp a_x a_y
==================== Strictness signatures ====================
CaseBinderCPR.$trModule: m
CaseBinderCPR.f_list_cmp: <L,C(C1(U(U)))><S,1*U><S,1*U>m
==================== Strictness signatures ====================
CaseBinderCPR.$trModule: m
CaseBinderCPR.f_list_cmp: <L,C(C1(U(1*U)))><S,1*U><S,1*U>m
......@@ -16,3 +16,4 @@ test('UnsatFun', normal, compile, [''])
test('BottomFromInnerLambda', normal, compile, [''])
test('DmdAnalGADTs', normal, compile, [''])
test('T12370', normal, compile, [''])
test('CaseBinderCPR', normal, compile, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment