diff options
| author | Graydon Hoare <[email protected]> | 2010-06-30 00:55:04 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-30 00:55:04 -0700 |
| commit | 7e853457dfdb9b8d677444423fecf1abfeb6c136 (patch) | |
| tree | a65a03b959c1a3a321e53e5170417eb8ac35a59d /src/boot/me/semant.ml | |
| parent | Add logging to type and effect. (diff) | |
| download | rust-7e853457dfdb9b8d677444423fecf1abfeb6c136.tar.xz rust-7e853457dfdb9b8d677444423fecf1abfeb6c136.zip | |
Move simplified_ty from trans to semant and use it a few places.
Diffstat (limited to 'src/boot/me/semant.ml')
| -rw-r--r-- | src/boot/me/semant.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml index 031f1b40..cb11991f 100644 --- a/src/boot/me/semant.ml +++ b/src/boot/me/semant.ml @@ -1066,12 +1066,19 @@ let check_concrete params thing = else bug () "unhandled parametric binding" ;; +let rec simplified_ty (t:Ast.ty) : Ast.ty = + match t with + Ast.TY_exterior t + | Ast.TY_mutable t + | Ast.TY_constrained (t, _) -> simplified_ty t + | _ -> t +;; let project_type (base_ty:Ast.ty) (comp:Ast.lval_component) : Ast.ty = - match (base_ty, comp) with + match (simplified_ty base_ty, comp) with (Ast.TY_rec elts, Ast.COMP_named (Ast.COMP_ident id)) -> begin match atab_search elts id with |