Adapt to new interface of reatk.ctrlNbac (≥ 0.11)

This commit is contained in:
Nicolas Berthier 2017-09-20 16:44:33 +01:00
parent 4274b21733
commit 15b2c09425
3 changed files with 7 additions and 4 deletions

View file

@ -244,6 +244,9 @@ let translate_expr gd e =
%a" print_typ (`Bint (s, w)), flag))
| `Nuop (op, e) -> mk_nuapp ?flag op e
| `Nnop (op, e, f, l) -> mk_nnapp ?flag op e f l
| `Luop _
| `Lbop _
| `Lsop _ -> raise (Untranslatable ("Bitwise operation", flag))
| #cond as c -> trcond ?flag tb tn c
| #flag as e -> apply' tn e
and mkb_ncmp ?flag re e f =
@ -264,8 +267,8 @@ let translate_expr gd e =
let flt = List.exists (fun { e_ty } -> e_ty = Initial.tfloat) el in
let typ = if flt then Initial.tfloat else Initial.tint in
let el = if flt
then List.rev_map flttyp_exp el
else List.rev el in
then List.rev_map flttyp_exp el
else List.rev el in
let op = mk_bapp (Efun (nnop typ op)) in
List.fold_left (fun acc e -> mkp typ (op acc e)) (List.hd el) (List.tl el)
and tp ?flag : 'f AST.exp -> _ = function

View file

@ -398,7 +398,7 @@ let prefix_vars ~pref vars : symb -> symb =
let declare_contr (decls, contrs, vds)
({ v_ident = id; v_type = ty } as vd) rank =
let v = mk_symb & name id in
SMap.add v (translate_typ ty, `Contr (one, rank, None), None) decls,
SMap.add v (translate_typ ty, `Contr (one, rank, `None), None) decls,
SMap.add v (id, ty) contrs,
vd :: vds

View file

@ -71,7 +71,7 @@ AC_CHECK_OCAML_PKG([lablgtk2])
AC_MSG_WARN([Could not find 'lablgtk2'. The simulator will not be built])
fi
dnl version should be >= 0.9.6
dnl version should be >= 0.11
AC_CHECK_OCAML_PKG([reatk.ctrlNbac])
if test "${OCAML_PKG_reatk_ctrlNbac}" = "no"; then
package_reatk_ctrlNbac="ocaml"; #dummy flag