From 3d9cf15d0b5c89f3e71d1679b0698f3884e5a5d2 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 19 Apr 2011 14:00:04 -0700 Subject: Remove half-baked 'opacity' layer qualifier. --- src/boot/fe/ast.ml | 21 --------------------- src/boot/fe/item.ml | 7 ++----- src/boot/fe/lexer.mll | 2 -- src/boot/fe/pexp.ml | 5 ----- src/boot/fe/token.ml | 6 ------ 5 files changed, 2 insertions(+), 39 deletions(-) (limited to 'src/boot') diff --git a/src/boot/fe/ast.ml b/src/boot/fe/ast.ml index c2387c5a..26c3b7c1 100644 --- a/src/boot/fe/ast.ml +++ b/src/boot/fe/ast.ml @@ -37,11 +37,6 @@ type layer = | LAYER_gc ;; -type opacity = - OPA_transparent - | OPA_abstract -;; - type mutability = MUT_mutable | MUT_immutable @@ -720,22 +715,6 @@ and fmt_layer_qual fmt_layer ff s; if s <> LAYER_value then fmt ff " "; -and fmt_opacity - (ff:Format.formatter) - (opa:opacity) - : unit = - match opa with - OPA_transparent -> () - | OPA_abstract -> fmt ff "abs" - -and fmt_opacity_qual - (ff:Format.formatter) - (op:opacity) - : unit = - fmt_opacity ff op; - if op <> OPA_transparent then fmt ff " "; - - and fmt_ty_fn (ff:Format.formatter) (ident_and_params:(ident * ty_param array) option) diff --git a/src/boot/fe/item.ml b/src/boot/fe/item.ml index df300b19..6b232e7e 100644 --- a/src/boot/fe/item.ml +++ b/src/boot/fe/item.ml @@ -609,8 +609,7 @@ and parse_stmts_including_none (ps:pstate) : Ast.stmt array = spans ps stmts apos (Ast.STMT_join lval) - | STATE | GC - | ABS | NATIVE + | STATE | GC | NATIVE | MOD | OBJ | TAG | TYPE | FN | USE -> let items = ctxt "stmt: decl" parse_mod_item ps in let bpos = lexpos ps in @@ -695,7 +694,6 @@ and parse_stmts_including_none (ps:pstate) : Ast.stmt array = and parse_ty_param (iref:int ref) (ps:pstate) : Ast.ty_param identified = let apos = lexpos ps in - let _ = Pexp.parse_opacity ps in let s = Pexp.parse_layer ps in let ident = Pexp.parse_ident ps in let i = !iref in @@ -990,9 +988,8 @@ and parse_mod_item (ps:pstate) match peek ps with - STATE | GC | ABS + STATE | GC | TYPE | OBJ | TAG | FN | ITER -> - let _ = Pexp.parse_opacity ps in let layer = Pexp.parse_layer ps in begin match peek ps with diff --git a/src/boot/fe/lexer.mll b/src/boot/fe/lexer.mll index 5cf73166..b375b874 100644 --- a/src/boot/fe/lexer.mll +++ b/src/boot/fe/lexer.mll @@ -95,8 +95,6 @@ ("claim", CLAIM); ("prove", PROVE); - ("abs", ABS); - ("state", STATE); ("gc", GC); diff --git a/src/boot/fe/pexp.ml b/src/boot/fe/pexp.ml index 5310f6df..ed36926d 100644 --- a/src/boot/fe/pexp.ml +++ b/src/boot/fe/pexp.ml @@ -140,11 +140,6 @@ and parse_optional_trailing_constrs (ps:pstate) : Ast.constrs = COLON -> (bump ps; parse_constrs ps) | _ -> [| |] -and parse_opacity (ps:pstate) : Ast.opacity = - match peek ps with - ABS -> bump ps; Ast.OPA_abstract - | _ -> Ast.OPA_transparent - and parse_layer (ps:pstate) : Ast.layer = match peek ps with STATE -> bump ps; Ast.LAYER_state diff --git a/src/boot/fe/token.ml b/src/boot/fe/token.ml index 7f4665c2..0b157983 100644 --- a/src/boot/fe/token.ml +++ b/src/boot/fe/token.ml @@ -80,9 +80,6 @@ type token = | CLAIM | PROVE - (* Opacity keywords *) - | ABS - (* Layer keywords *) | STATE | GC @@ -243,9 +240,6 @@ let rec string_of_tok t = | CLAIM -> "claim" | PROVE -> "prove" - (* Opacity keywords *) - | ABS -> "abs" - (* Layer keywords *) | STATE -> "state" | GC -> "gc" -- cgit v1.2.3