expr14.ml 456 Bytes
Newer Older
1
open Hashcons
2 3 4 5
open Expr12 (* [oexpr] *)
open Expr13 (*  [expr] *)
open Expr08 (* [hexpr] *)

6
let import : expr -> hexpr =
7 8 9
  let v = object (self)
    inherit [_] omap
    method visit_'expr _env (E e) =
POTTIER Francois's avatar
POTTIER Francois committed
10
      h (self#visit_oexpr _env e)
11
  end in
12
  v # visit_'expr ()
13

14
let export : hexpr -> expr =
15 16 17 18 19
  let v = object (self)
    inherit [_] omap
    method visit_'expr _env (H { node = e; _ }) =
      E (self#visit_oexpr _env e)
  end in
20
  v # visit_'expr ()