aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/genarg.mli
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-12-21 00:38:00 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-12-21 19:36:38 +0100
commit44ac395761d6b46866823b89addaea0ab45f4ebc (patch)
tree36b9a02321e6cdc0bf978a54066e96636e820abd /lib/genarg.mli
parent5835804bd69a193b9ea29b6d4c8d0cc03530ccdd (diff)
Finer-grained types for toplevel values.
Diffstat (limited to 'lib/genarg.mli')
-rw-r--r--lib/genarg.mli21
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/genarg.mli b/lib/genarg.mli
index 83ba1dd04..090496093 100644
--- a/lib/genarg.mli
+++ b/lib/genarg.mli
@@ -72,7 +72,22 @@ type ('raw, 'glob, 'top) genarg_type
(** Generic types. ['raw] is the OCaml lowest level, ['glob] is the globalized
one, and ['top] the internalized one. *)
-module Val : Dyn.S
+module Val :
+sig
+ type 'a typ
+
+ type _ tag =
+ | Base : 'a typ -> 'a tag
+ | List : 'a tag -> 'a list tag
+ | Opt : 'a tag -> 'a option tag
+ | Pair : 'a tag * 'b tag -> ('a * 'b) tag
+
+ type t = Dyn : 'a tag * 'a -> t
+
+ val eq : 'a tag -> 'b tag -> ('a, 'b) CSig.eq option
+ val repr: 'a tag -> Pp.std_ppcmds
+
+end
(** Dynamic types for toplevel values. While the generic types permit to relate
objects at various levels of interpretation, toplevel values are wearing
their own type regardless of where they came from. This allows to use the
@@ -193,10 +208,6 @@ val val_tag : 'a typed_abstract_argument_type -> 'a Val.tag
val val_cast : 'a typed_abstract_argument_type -> Val.t -> 'a
-val option_val : Val.t option Val.tag
-val list_val : Val.t list Val.tag
-val pair_val : (Val.t * Val.t) Val.tag
-
(** {6 Type reification} *)
type argument_type =