Commit 15b2c094 authored by Nicolas Berthier's avatar Nicolas Berthier

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

parent 4274b217
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment