From 07c207faf05373bcd409d19ff1c3c57516f69acd Mon Sep 17 00:00:00 2001 From: Drahflow Date: Tue, 14 Apr 2015 16:30:22 +0200 Subject: Fixes to co-iteration --- compiler/standardClient.ey | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'compiler') diff --git a/compiler/standardClient.ey b/compiler/standardClient.ey index b31011c..7e9d94b 100644 --- a/compiler/standardClient.ey +++ b/compiler/standardClient.ey @@ -600,6 +600,10 @@ { 0 earlierType * sys .typed .type 0 neq } { 0 } + # General integers co-iterate only if equal + { 0 earlierType * 0 laterType * neq } + { 0 } + # Who came first determines iteration range { 2 earlierType * 1 neg neq } { earlierType 1 } @@ -608,12 +612,9 @@ { 2 laterType * 1 neg neq } { laterType 1 } - # General integers co-iterate iff equal - { 0 earlierType * 0 laterType * eq } - { earlierType 1 } - + # If none defines a range, take the first { 1 } - { 0 } + { earlierType 1 } ] conds } /commonIterationType deff -- cgit v1.2.3