aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/semant.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-02 16:27:39 -0700
committerGraydon Hoare <[email protected]>2010-07-02 16:27:39 -0700
commit8660ce50a134a74bc841f32e50eb1eab83f8b45b (patch)
treeaeb7795b09c1d2507198cfa8642ef797d685bc8f /src/boot/me/semant.ml
parentFix bug in clone logic; was ignoring the mutability-strip step in later rule. (diff)
parentFix two bugs in tag patterns: 1. Look up the tag constructor function item us... (diff)
downloadrust-8660ce50a134a74bc841f32e50eb1eab83f8b45b.tar.xz
rust-8660ce50a134a74bc841f32e50eb1eab83f8b45b.zip
Merge branch 'master' of [email protected]:graydon/rust into exterior_and_mutable_types
Diffstat (limited to 'src/boot/me/semant.ml')
-rw-r--r--src/boot/me/semant.ml18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml
index ea82e685..8d2ed8ac 100644
--- a/src/boot/me/semant.ml
+++ b/src/boot/me/semant.ml
@@ -432,15 +432,15 @@ let fn_output_ty (fn_ty:Ast.ty) : Ast.ty =
(* name of tag constructor function -> name for indexing in the ty_tag *)
let rec tag_ctor_name_to_tag_name (name:Ast.name) : Ast.name =
match name with
- Ast.NAME_base nb ->
- begin
- match nb with
- Ast.BASE_ident _ -> name
- | Ast.BASE_app (id, _) -> Ast.NAME_base (Ast.BASE_ident id)
- | _ ->
- bug () "tag_or_iso_ty_tup_by_name with non-tag-ctor name"
- end
- | Ast.NAME_ext (inner_name, _) -> tag_ctor_name_to_tag_name inner_name
+ Ast.NAME_base (Ast.BASE_ident _) -> name
+ | Ast.NAME_base (Ast.BASE_app (id, _)) ->
+ Ast.NAME_base (Ast.BASE_ident id)
+
+ | Ast.NAME_ext (_, Ast.COMP_ident id)
+ | Ast.NAME_ext (_, Ast.COMP_app (id, _)) ->
+ Ast.NAME_base (Ast.BASE_ident id)
+
+ | _ -> bug () "tag_or_iso_ty_tup_by_name with non-tag-ctor name"
;;
let tag_or_iso_ty_tup_by_name (ty:Ast.ty) (name:Ast.name) : Ast.ty_tup =