diff options
| author | Kathy Gray | 2016-01-20 14:09:26 +0000 |
|---|---|---|
| committer | Kathy Gray | 2016-01-20 14:09:26 +0000 |
| commit | 1cef053b05af5da27da9908b0f661d497a97b5b7 (patch) | |
| tree | 2c8442f800687c4a525aa36474baec60cb879e65 | |
| parent | 222fdc8a12a37fe2d44a0cdeb7a49279b2cf56d8 (diff) | |
keep specified order of vectors...
| -rw-r--r-- | src/type_check.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/type_check.ml b/src/type_check.ml index b9fd37ff..897ef522 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -914,9 +914,9 @@ let rec check_exp envs (imp_param:nexp option) (widen:bool) (expect_t:t) (E_aux( let item_t,ord = match expect_t.t with | Tapp("vector",[base;rise;TA_ord ord;TA_typ item_t]) -> item_t,ord | _ -> new_t (),d_env.default_o in - let es,cs,effect,item_t = (List.fold_left - (fun (es,cs,effect,_) (e,t,_,c,_,ef) -> (e::es),(c@cs),union_effects ef effect,t) - ([],[],pure_e,item_t) (List.map (check_exp envs imp_param true item_t) es)) in + let es,cs,effect,item_t = (List.fold_right + (fun (e,t,_,c,_,ef) (es,cs,effect,_) -> (e::es),(c@cs),union_effects ef effect,t) + (List.map (check_exp envs imp_param true item_t) es) ([],[],pure_e,item_t)) in let len = List.length es in let t = match ord.order,d_env.default_o.order with | (Oinc,_) | (Ouvar _,Oinc) | (Ovar _,Oinc) -> |
