aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-01-11 21:40:23 +0100
committerPierre-Marie Pédrot2016-01-14 18:23:32 +0100
commit67b9b34d409c793dc449104525684852353ee064 (patch)
tree50a061e5cbaea7507c226d94d33fdfc5d10bc5ee /lib
parent00e27eac9fe207d754952c1ddb0e12861ee293c9 (diff)
Removing ident and var generic arguments.
Diffstat (limited to 'lib')
-rw-r--r--lib/genarg.ml12
-rw-r--r--lib/genarg.mli4
2 files changed, 1 insertions, 15 deletions
diff --git a/lib/genarg.ml b/lib/genarg.ml
index 6108c15555..af9ea70ec5 100644
--- a/lib/genarg.ml
+++ b/lib/genarg.ml
@@ -56,9 +56,6 @@ struct
end
type argument_type =
- (* Basic types *)
- | IdentArgType
- | VarArgType
(* Specific types *)
| ConstrArgType
| ListArgType of argument_type
@@ -67,8 +64,6 @@ type argument_type =
| ExtraArgType of string
let rec argument_type_eq arg1 arg2 = match arg1, arg2 with
-| IdentArgType, IdentArgType -> true
-| VarArgType, VarArgType -> true
| ConstrArgType, ConstrArgType -> true
| ListArgType arg1, ListArgType arg2 -> argument_type_eq arg1 arg2
| OptArgType arg1, OptArgType arg2 -> argument_type_eq arg1 arg2
@@ -78,8 +73,6 @@ let rec argument_type_eq arg1 arg2 = match arg1, arg2 with
| _ -> false
let rec pr_argument_type = function
-| IdentArgType -> str "ident"
-| VarArgType -> str "var"
| ConstrArgType -> str "constr"
| ListArgType t -> pr_argument_type t ++ spc () ++ str "list"
| OptArgType t -> pr_argument_type t ++ spc () ++ str "opt"
@@ -204,13 +197,10 @@ let default_empty_value t =
(** Beware: keep in sync with the corresponding types *)
let base_create n = Val.Base (Dyn.create n)
-let ident_T = base_create "ident"
let genarg_T = base_create "genarg"
let constr_T = base_create "constr"
let rec val_tag = function
-| IdentArgType -> cast_tag ident_T
-| VarArgType -> cast_tag ident_T
(** Must ensure that toplevel types of Var and Ident agree! *)
| ConstrArgType -> cast_tag constr_T
| ExtraArgType s -> cast_tag (String.Map.find s !arg0_map).dyn
@@ -232,8 +222,6 @@ let try_prj wit v = match prj (val_tag wit) v with
let rec val_cast : type a. a typed_abstract_argument_type -> Val.t -> a =
fun wit v -> match unquote wit with
-| IdentArgType
-| VarArgType
| ConstrArgType
| ExtraArgType _ -> try_prj wit v
| ListArgType t ->
diff --git a/lib/genarg.mli b/lib/genarg.mli
index 674ee97ae8..8d929f9f69 100644
--- a/lib/genarg.mli
+++ b/lib/genarg.mli
@@ -212,10 +212,8 @@ val val_cast : 'a typed_abstract_argument_type -> Val.t -> 'a
type argument_type =
(** Basic types *)
- | IdentArgType
- | VarArgType
- (** Specific types *)
| ConstrArgType
+ (** Specific types *)
| ListArgType of argument_type
| OptArgType of argument_type
| PairArgType of argument_type * argument_type