aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-04 14:30:48 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-04 14:34:18 +0200
commit8d3f0b614d7b2fb30f6e87b48a4fc5c0d286e49c (patch)
tree6a244976f5caef6a2b88c84053fce87f94c78f96 /engine
parentc7fd62135403c1ea38194fcdd8035237ee108318 (diff)
Normalizing the names of dynamic types to follow a typ_* scheme.
Diffstat (limited to 'engine')
-rw-r--r--engine/geninterp.ml12
-rw-r--r--engine/geninterp.mli6
2 files changed, 9 insertions, 9 deletions
diff --git a/engine/geninterp.ml b/engine/geninterp.ml
index ffc22f221..45b0aa231 100644
--- a/engine/geninterp.ml
+++ b/engine/geninterp.ml
@@ -34,16 +34,16 @@ struct
let rec pr : type a. a typ -> Pp.std_ppcmds = fun t -> Pp.str (repr t)
- let list_tag = ValT.create "list"
- let opt_tag = ValT.create "option"
- let pair_tag = ValT.create "pair"
+ let typ_list = ValT.create "list"
+ let typ_opt = ValT.create "option"
+ let typ_pair = ValT.create "pair"
let rec inject : type a. a tag -> a -> t = fun tag x -> match tag with
| Base t -> Dyn (t, x)
- | List tag -> Dyn (list_tag, List.map (fun x -> inject tag x) x)
- | Opt tag -> Dyn (opt_tag, Option.map (fun x -> inject tag x) x)
+ | List tag -> Dyn (typ_list, List.map (fun x -> inject tag x) x)
+ | Opt tag -> Dyn (typ_opt, Option.map (fun x -> inject tag x) x)
| Pair (tag1, tag2) ->
- Dyn (pair_tag, (inject tag1 (fst x), inject tag2 (snd x)))
+ Dyn (typ_pair, (inject tag1 (fst x), inject tag2 (snd x)))
end
diff --git a/engine/geninterp.mli b/engine/geninterp.mli
index 579986211..42e1e3784 100644
--- a/engine/geninterp.mli
+++ b/engine/geninterp.mli
@@ -31,9 +31,9 @@ sig
val repr : 'a typ -> string
val pr : 'a typ -> Pp.std_ppcmds
- val list_tag : t list typ
- val opt_tag : t option typ
- val pair_tag : (t * t) typ
+ val typ_list : t list typ
+ val typ_opt : t option typ
+ val typ_pair : (t * t) typ
val inject : 'a tag -> 'a -> t