diff options
author | martinw | 2000-11-02 14:09:30 +0000 |
---|---|---|
committer | martinw | 2000-11-02 14:09:30 +0000 |
commit | ccf46727369f5174e42ea96b8d9cc404bea94396 (patch) | |
tree | bc0423ff292deca2285b4413220288c5cc6820f2 /frontend/utilities.icl | |
parent | Sjaak: Bug in instance types removed, (diff) |
optimizing performance of explicitimports
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@280 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/utilities.icl')
-rw-r--r-- | frontend/utilities.icl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/frontend/utilities.icl b/frontend/utilities.icl index 51f2c9d..60a49d9 100644 --- a/frontend/utilities.icl +++ b/frontend/utilities.icl @@ -209,11 +209,12 @@ mapFilterYesSt f l st :== map_filter_yes_st l st where map_filter_yes_st [] st + #! st = st = ([], st) map_filter_yes_st [h:t] st #! (opt_f_h , st) = f h st (t2, st) = map_filter_yes_st t st - f_h_t2 = optCons opt_f_h t2 + (f_h_t2, _) = optCons opt_f_h t2 st = st = (f_h_t2, st) @@ -222,19 +223,20 @@ iMapFilterYesSt f fr to st :== i_map_filter_yes_st fr to st where i_map_filter_yes_st fr to st + #! st = st | fr >= to = ([], st) #! (opt_f_fr, st) = f fr st (t, st) = i_map_filter_yes_st (inc fr) to st - f_fr_t2 = optCons opt_f_fr t + (f_fr_t2, _) = optCons opt_f_fr t st = st = (f_fr_t2, st) -optCons :: !(Optional .a) !u:[.a] -> v:[.a] ,[u <= v] +optCons :: !(Optional .a) !u:[.a] -> (!v:[.a], !Int) ,[u <= v] optCons No l - = l + = (l, 0) optCons (Yes x) l - = [x:l] + = ([x:l], 0) eqMerge :: ![a] ![a] -> [a] | Eq a |