diff options
| author | Pierre-Marie Pédrot | 2016-05-04 14:30:48 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2016-05-04 14:34:18 +0200 |
| commit | 8d3f0b614d7b2fb30f6e87b48a4fc5c0d286e49c (patch) | |
| tree | 6a244976f5caef6a2b88c84053fce87f94c78f96 /engine/geninterp.ml | |
| parent | c7fd62135403c1ea38194fcdd8035237ee108318 (diff) | |
Normalizing the names of dynamic types to follow a typ_* scheme.
Diffstat (limited to 'engine/geninterp.ml')
| -rw-r--r-- | engine/geninterp.ml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/geninterp.ml b/engine/geninterp.ml index ffc22f2213..45b0aa2316 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 |
