Commit 14fb29d8 authored by Andrei Paskevich's avatar Andrei Paskevich

Mlw_dexpr: drop DEval, we should generalize effectless DEany instead

parent 75a68951
......@@ -388,7 +388,6 @@ and dexpr_node =
| DElsapp of lsymbol * dexpr list
| DEapply of dexpr * dexpr
| DEconst of Number.constant
| DEval of dval_decl * dexpr
| DElet of dlet_defn * dexpr
| DEfun of dfun_defn * dexpr
| DErec of dfun_defn list * dexpr
......@@ -413,12 +412,12 @@ and dexpr_node =
| DEuloc of dexpr * Loc.position
| DElabel of dexpr * Slab.t
and dval_decl = preid * ghost * dtype_v
and dlet_defn = preid * ghost * dexpr
and dfun_defn = preid * ghost * dbinder list * dexpr * dspec later
type dval_decl = preid * ghost * dtype_v
(** Environment *)
type denv = {
......@@ -484,9 +483,6 @@ let dvty_of_dtype_v dtv =
| DSpecV res -> List.rev argl, res in
dvty [] dtv
let denv_add_val denv (id,_,dtv) =
denv_add_poly denv id (dvty_of_dtype_v dtv)
let denv_add_let denv (id,_,{de_dvty = dvty}) =
denv_add_mono denv id dvty
......@@ -634,7 +630,6 @@ let dexpr ?loc node =
[], dity_int
| DEconst (Number.ConstReal _) ->
[], dity_real
| DEval (_,de)
| DElet (_,de)
| DEfun (_,de)
| DErec (_,de) ->
......@@ -1120,11 +1115,6 @@ and try_expr keep_loc uloc env (argl,res) node =
e_lapp fs_func_app [get env de1; get env de2] (ity_of_dity res)
| DEconst c ->
e_const c
| DEval (vald,de) ->
let lv = val_decl env vald in
let env = add_let_sym env lv in
let _e = get env de in
assert false (* TODO: e_val lv e *)
| DElet ((id,gh,de1),de2) ->
let e1 = get env de1 in
let mk_expr e1 =
......
......@@ -104,7 +104,6 @@ and dexpr_node =
| DElsapp of lsymbol * dexpr list
| DEapply of dexpr * dexpr
| DEconst of Number.constant
| DEval of dval_decl * dexpr
| DElet of dlet_defn * dexpr
| DEfun of dfun_defn * dexpr
| DErec of dfun_defn list * dexpr
......@@ -129,20 +128,18 @@ and dexpr_node =
| DEuloc of dexpr * Loc.position
| DElabel of dexpr * Slab.t
and dval_decl = preid * ghost * dtype_v
and dlet_defn = preid * ghost * dexpr
and dfun_defn = preid * ghost * dbinder list * dexpr * dspec later
type dval_decl = preid * ghost * dtype_v
(** Environment *)
type denv
val denv_empty : denv
val denv_add_val : denv -> dval_decl -> denv
val denv_add_let : denv -> dlet_defn -> denv
val denv_add_fun : denv -> dfun_defn -> denv
......@@ -180,9 +177,6 @@ val dexpr : ?loc:Loc.position -> dexpr_node -> dexpr
val expr : keep_loc:bool ->
Decl.known_map -> Mlw_decl.known_map -> dexpr -> expr
val val_decl : keep_loc:bool ->
Decl.known_map -> Mlw_decl.known_map -> dval_decl -> let_sym
val let_defn : keep_loc:bool ->
Decl.known_map -> Mlw_decl.known_map -> dlet_defn -> let_defn
......@@ -191,3 +185,6 @@ val fun_defn : keep_loc:bool ->
val rec_defn : keep_loc:bool ->
Decl.known_map -> Mlw_decl.known_map -> dfun_defn list -> fun_defn list
val val_decl : keep_loc:bool ->
Decl.known_map -> Mlw_decl.known_map -> dval_decl -> let_sym
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