Bug correction in reset

"e1 fby e2" was not handled in the reset pass.
This commit is contained in:
Gwenaël Delaval 2015-09-04 17:35:12 +02:00
parent fd4dffef62
commit 9b75408f23

View file

@ -76,7 +76,16 @@ let default e =
| _ -> None
let edesc funs ((res,_) as acc) ed = match ed with
let edesc funs ((res,_) as acc) ed =
match ed with
| Epre (Some c, e) ->
let e,_ = Hept_mapfold.exp_it funs acc e in
(match res with
| None -> Epre(Some c, e)
| Some _ ->
ifres res
(mk_exp (Econst c) (e.e_ty) ~linearity:Linearity.Ltop)
{ e with e_desc = Epre(Some c,e) }), acc
| Efby (e1, e2) ->
let e1,_ = Hept_mapfold.exp_it funs acc e1 in
let e2,_ = Hept_mapfold.exp_it funs acc e2 in