patch applied (hat): Fix a bug in translating (n+k) patterns to code.
10 Oct
2006
10 Oct
'06
11:07 a.m.
Fri Sep 14 09:12:57 PDT 2001 malcolm * Fix a bug in translating (n+k) patterns to code. The symptom was that foo (n+1) Foo = 1 foo (n+1) Bar = 2 foo _ _ = 3 main = print (foo 1 Bar) was offering 3 as result, not 2 as expected. The cause was that the two equations were being matched in an nested if..then..else sequence, with (n>=1) as the condition. The correct way is to sequence the matches with FATBAR, so the second match is actually attempted. M ./src/compiler98/Case.hs -3 +6
7026
Age (days ago)
7026
Last active (days ago)
0 comments
1 participants
participants (1)
-
Malcolm Wallace