aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/semant.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-10-12 12:28:46 -0700
committerGraydon Hoare <[email protected]>2010-10-12 12:28:46 -0700
commitbeb4c07e26794dde482b4de85107f1e078375036 (patch)
tree84bff2b8cddc28b6f0020c9dffc1e6dacec873cb /src/boot/me/semant.ml
parentChanges to make rustboot compile on OCaml 3.12 (diff)
downloadrust-beb4c07e26794dde482b4de85107f1e078375036.tar.xz
rust-beb4c07e26794dde482b4de85107f1e078375036.zip
Git index wins again.
Diffstat (limited to 'src/boot/me/semant.ml')
-rw-r--r--src/boot/me/semant.ml17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml
index a4bad711..c8b3b45e 100644
--- a/src/boot/me/semant.ml
+++ b/src/boot/me/semant.ml
@@ -546,9 +546,9 @@ let slot_ty (s:Ast.slot) : Ast.ty =
let fn_output_ty (fn_ty:Ast.ty) : Ast.ty =
match fn_ty with
- Ast.TY_fn ({ Ast.sig_output_slot = slot; _ }, _) ->
+ Ast.TY_fn (tsig, _) ->
begin
- match slot.Ast.slot_ty with
+ match tsig.Ast.sig_output_slot.Ast.slot_ty with
Some ty -> ty
| None -> bug () "function has untyped output slot"
end
@@ -579,8 +579,10 @@ let defn_is_static (d:defn) : bool =
let defn_is_callable (d:defn) : bool =
match d with
- DEFN_slot { Ast.slot_ty = Some Ast.TY_fn _; _ }
- | DEFN_item { Ast.decl_item = (Ast.MOD_ITEM_fn _ ); _ } -> true
+ DEFN_slot { Ast.slot_ty = Some Ast.TY_fn _;
+ Ast.slot_mode = _ }
+ | DEFN_item { Ast.decl_item = (Ast.MOD_ITEM_fn _ );
+ Ast.decl_params = _ } -> true
| _ -> false
;;
@@ -637,7 +639,7 @@ let atoms_to_names (atoms:Ast.atom array)
let rec lval_to_name (lv:Ast.lval) : Ast.name =
match lv with
- Ast.LVAL_base { node = nb; _ } ->
+ Ast.LVAL_base { node = nb; id = _ } ->
Ast.NAME_base nb
| Ast.LVAL_ext (lv, lv_comp) ->
let comp =
@@ -655,7 +657,7 @@ let rec plval_to_name (pl:Ast.plval) : Ast.name =
match pl with
Ast.PLVAL_base nb ->
Ast.NAME_base nb
- | Ast.PLVAL_ext_name ({node = Ast.PEXP_lval pl; _}, nc) ->
+ | Ast.PLVAL_ext_name ({node = Ast.PEXP_lval pl; id = _}, nc) ->
Ast.NAME_ext (plval_to_name pl, nc)
| _ -> bug () "plval_to_name with plval that contains non-name components"
;;
@@ -1878,7 +1880,8 @@ let get_mod_item
(node:node_id)
: (Ast.mod_view * Ast.mod_items) =
match get_item cx node with
- { Ast.decl_item = Ast.MOD_ITEM_mod md; _ } -> md
+ { Ast.decl_item = Ast.MOD_ITEM_mod md;
+ Ast.decl_params = _ } -> md
| _ -> bugi cx node "defn is not a mod"
;;