Commits

camlspotter committed ec5f45c Merge

merge with ocaml-4.00.0

Comments (0)

Files changed (10)

 spoteval.cmi : utils.cmi spot.cmi
 spotfile.cmi : spoteval.cmi spot.cmi
 treeset.cmi : xset.cmi
-ttfold.cmi :
 typeFix.cmi :
 typeexpand.cmi :
 utils.cmi :
     spotconfig.cmx spot.cmx pathreparse.cmx ext.cmx command.cmx cmt.cmx
 pathreparse.cmo : utils.cmi spot.cmi locident.cmi ext.cmo pathreparse.cmi
 pathreparse.cmx : utils.cmx spot.cmx locident.cmx ext.cmx pathreparse.cmi
-spot.cmo : utils.cmi ttfold.cmi treeset.cmi ext.cmo cmt.cmi checksum.cmo \
+spot.cmo : utils.cmi ttfold.cmo treeset.cmi ext.cmo cmt.cmi checksum.cmo \
     spot.cmi
 spot.cmx : utils.cmx ttfold.cmx treeset.cmx ext.cmx cmt.cmx checksum.cmx \
     spot.cmi
     cmt.cmx spotfile.cmi
 treeset.cmo : xset.cmi treeset.cmi
 treeset.cmx : xset.cmx treeset.cmi
-ttfold.cmo : ttfold.cmi
-ttfold.cmx : ttfold.cmi
+ttfold.cmo :
+ttfold.cmx :
+ttfold.out.cmo :
+ttfold.out.cmx :
+ttfoldx.cmo :
+ttfoldx.cmx :
 typeFix.cmo : utils.cmi name.cmi typeFix.cmi
 typeFix.cmx : utils.cmx name.cmx typeFix.cmi
 typeexpand.cmo : utils.cmi typeexpand.cmi
 OCamlSpotter 2.0.0 uses \*.cmt and \*.cmti files created by OCaml compiler 4.00.0 or newer with -bin-annot option.
 
 Unlike OCamlSpotter 1.x, OCamlSpotter 2.0.0 is a standalone application. You NO LONGER need compiler patching. Just make, make install, and configure ocamlspot.el.
+
+Dependency
+=====================
+
+OCamlSpotter strongly depends on OCaml compiler implementation and its compiler-libs library.
+You need use the correct pairs of compiler and OCamlSpotter.
+
+https://camlspotter@bitbucket.org/camlspotter/ocamlspot provides OCamlSpotter branches 
+for each OCaml versions:
+
+* ocaml-version-name : compilable against the given OCaml version
+* default : For the latest OCaml development version or something around. Probably not for you.
+* dev : default + something experimental. Absolutely not for you unless you are explicitly instructed to use this.

File contents unchanged.

   open Value
   module Format = OCaml.Format
 
-  let str_of_global_ident = ref (fun ~load_paths:_ _ -> assert false : load_paths: string list -> Ident.t -> string * Value.structure)
+  let str_of_global_ident = ref (fun ~cwd:_ ~load_paths:_ _ -> assert false : cwd: string -> load_paths: string list -> Ident.t -> string * Value.structure)
   let packed = ref (fun _ _ -> assert false : Env.t -> string -> Value.t)
 
   let rec find_path env (kind, p) : Value.z = 
         | None -> 
             if Ident.global id then
               lazy begin try
-                let path, str = !str_of_global_ident ~load_paths:env.load_paths id in
+                let path, str = !str_of_global_ident ~cwd:env.cwd ~load_paths:env.load_paths id in
                 let str = Structure ( { PIdent.path = path; ident = None }, 
                                       str,
                                       None (* CR jfuruse: todo (read .mli *))
                 str
               with
               | e -> 
-                  eprintf "LOAD FAILIURE %s: %s@." (Ident.name id) (Printexc.to_string e);
+                  eprintf "LOAD FAILURE %s: %s@." (Ident.name id) (Printexc.to_string e);
                   Error e
               end
             else begin 
 
   and find_ident (str : Value.structure) (kind, name, pos) : Value.z =
     let name_filter = fun (id, (k,_)) -> 
+(*
       Debug.format "DEBUG: %s %s ? %s %s@."
         (Kind.to_string kind)
         name 
         (Kind.to_string k)
         (Ident0.name id);
+*)
       k = kind && Ident0.name id = name in
     (* CR jfuruse: double check by pos! *)
     lazy begin
 module Eval : sig
   (** These function ref will be initialized from ocamlspot.ml *)
   val str_of_global_ident :
-    (load_paths:string list -> Ident.t -> string * Value.structure) ref
+    (cwd:string -> load_paths:string list -> Ident.t -> string * Value.structure) ref
   val packed : (Env.t -> string -> Value.t) ref
     
   val find_path : Env.t -> Kind.t * Path.t -> Value.z
 module Load : sig
   exception Old_cmt of string (* cmt *) * string (* source *)
   val load : load_paths:string list -> string -> Unit.t
-  val load_module : ?spit:bool -> load_paths:string list -> string -> Unit.t
+  val load_module : ?spit:bool -> cwd:string -> load_paths:string list -> string -> Unit.t
 end = struct
 
   let check_time_stamp ~cmt source =
     let stat_cmt = Unix.stat cmt in
-    let stat_source = Unix.stat source in
-      (* Needs = : for packed modules, .cmt and the source .cmo are written 
-         almost at the same moment. *)
-    stat_cmt.Unix.st_mtime >= stat_source.Unix.st_mtime
+    try
+      let stat_source = Unix.stat source in
+        (* Needs = : for packed modules, .cmt and the source .cmo are written 
+           almost at the same moment. *)
+      stat_cmt.Unix.st_mtime >= stat_source.Unix.st_mtime
+    with
+    | Unix.Unix_error(_, "stat", _) ->
+        (* CR jfuruse: Camlp4.cmt created from Camlp4.cmx but Camlp4.cmx
+           is not installed!!! In such a case, we cannot check the time
+           stamp check... (still we can try against Camlp4.cmi installed)
+        *)
+        eprintf "Warning: source %s does not exist. Time stamp check was skipped.@." source;
+        true
 
   let find_alternative_source ~cmt source =
       (* if [source] is not found, we try finding files with the same basename
   let load_directly path : Unit.t =
     Debug.format "cmt loading from %s@." path;
     match load_cmt_file path with
-    | Some cmt -> Spot.Unit.of_file (Spot.File.of_cmt path cmt)
+    | Some cmt -> 
+        Spot.Unit.of_file (Spot.File.of_cmt path cmt)
     | None -> failwith (sprintf "load_directly failed: %s" path)
 
   exception Old_cmt of string (* cmt *) * string (* source *)
   let find_in_path load_paths body ext =
     let body_ext = body ^ ext in
     let find_in_path load_paths name = 
+      Debug.format "@[<2>searching %s in@ pwd=%s@ paths=[@[%a@]]@]@." 
+        name
+        (Sys.getcwd ())
+        (Format.list "; " (fun ppf x -> fprintf ppf "%S" x)) 
+        load_paths;
       try Misc.find_in_path load_paths name with Not_found ->
         Misc.find_in_path_uncap load_paths name
     in
     
 
   let load ~load_paths cmtname : Unit.t =
-    Debug.format "@[<2>cmt searching %s in@ paths [@[%a@]]@]@." 
-        cmtname
-        (Format.list "; " (fun ppf x -> fprintf ppf "%S" x)) 
-        load_paths;
     let body, ext = Filename.split_extension cmtname in
     let path = find_in_path load_paths body ext in
     load_directly_with_cache path
         | Some cmtname -> load ~load_paths cmtname
         | None -> raise e
 
+  let with_cwd cwd f = 
+    let d = Sys.getcwd () in
+    protect ~f:(fun () -> Sys.chdir cwd; f ()) () 
+      ~finally: (fun _ -> Sys.chdir d)
+
   (* CR jfuruse: searching algorithm must be reconsidered *)        
-  let load_module ?(spit=false) ~load_paths name =
+  let load_module ?(spit=false) ~cwd ~load_paths name =
     let cmtname = name ^ if spit then ".cmti" else ".cmt" in
     try
-      load ~load_paths cmtname
+      with_cwd cwd (fun () -> load ~load_paths cmtname)
     with
     | Failure s ->
         let spitname = name ^ if spit then ".cmt" else ".cmti" in
   in
   eval_and_find path
 
-let str_of_global_ident ~load_paths id =
+let str_of_global_ident ~cwd ~load_paths id =
   assert (Ident.global id);
-  let file = Load.load_module ~spit:Spotconfig.print_interface ~load_paths (Ident0.name id) in
+  let file = Load.load_module ~spit:Spotconfig.print_interface ~cwd ~load_paths (Ident0.name id) in
   file.Unit.path,
   Eval.structure (empty_env file) file.Unit.top
 
 
 exception Old_cmt of string * string
 val load : load_paths:string list -> string -> Unit.t
-val load_module : ?spit:bool -> load_paths:string list -> string -> Unit.t (* CR jfuruse: spit *)
+val load_module : ?spit:bool -> cwd:string -> load_paths:string list -> string -> Unit.t (* CR jfuruse: spit *)
 
 val empty_env   : Unit.t -> Env.t
 val invalid_env : Unit.t -> Env.t
 type result = File_itself | Found_at of Region.t | Predefined
 
 val find_path_in_flat : Unit.t -> Kind.t * Path.t -> PIdent.t * result
-val str_of_global_ident : load_paths:string list -> Ident.t -> string * Value.structure
+val str_of_global_ident : cwd:string -> load_paths:string list -> Ident.t -> string * Value.structure
 val eval_packed : Env.t -> string -> Value.t
 
 open Typedtree
   
 class fold =
-  object ((o : 'self_type))
-    method string : string -> 'self_type = o#unknown
-    method ref :
-      'a. ('self_type -> 'a -> 'self_type) -> 'a ref -> 'self_type =
-      fun _f_a { contents = _x } -> let o = _f_a o _x in o
-    method option :
-      'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type =
-      fun _f_a -> function | None -> o | Some _x -> let o = _f_a o _x in o
-    method list :
-      'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type =
-      fun _f_a ->
-        function
-        | [] -> o
-        | _x :: _x_i1 -> let o = _f_a o _x in let o = o#list _f_a _x_i1 in o
-    method int : int -> 'self_type = o#unknown
-    method bool : bool -> 'self_type = function | false -> o | true -> o
-    method with_constraint : with_constraint -> 'self_type =
-      function
-      | Twith_type _x -> let o = o#type_declaration _x in o
-      | Twith_module (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in o
-      | Twith_typesubst _x -> let o = o#type_declaration _x in o
-      | Twith_modsubst (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in o
-    method virtual_flag : virtual_flag -> 'self_type = o#unknown
-    method value_description : value_description -> 'self_type =
-      fun { val_desc = _x; val_val = _x_i1; val_prim = _x_i2; val_loc = _x_i3
-        } ->
-        let o = o#core_type _x in
-        let o = o#unknown _x_i1 in
-        let o = o#list (fun o -> o#string) _x_i2 in
-        let o = o#unknown _x_i3 in o
-    method type_kind : type_kind -> 'self_type =
-      function
-      | Ttype_abstract -> o
-      | Ttype_variant _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2, _x_i3) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#list (fun o -> o#core_type) _x_i2 in
-                 let o = o#unknown _x_i3 in o)
-              _x
-          in o
-      | Ttype_record _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#mutable_flag _x_i2 in
-                 let o = o#core_type _x_i3 in let o = o#unknown _x_i4 in o)
-              _x
-          in o
-    method type_expr : type_expr -> 'self_type = o#unknown
-    method type_declaration : type_declaration -> 'self_type =
-      fun
-        {
-          typ_params = _x;
-          typ_type = _x_i1;
-          typ_cstrs = _x_i2;
-          typ_kind = _x_i3;
-          typ_private = _x_i4;
-          typ_manifest = _x_i5;
-          typ_variance = _x_i6;
-          typ_loc = _x_i7
-        } ->
-        let o =
-          o#list (fun o -> o#option (fun o -> o#loc (fun o -> o#string))) _x in
-        let o = o#unknown _x_i1 in
-        let o =
-          o#list
-            (fun o (_x, _x_i1, _x_i2) ->
-               let o = o#core_type _x in
-               let o = o#core_type _x_i1 in let o = o#unknown _x_i2 in o)
-            _x_i2 in
-        let o = o#type_kind _x_i3 in
-        let o = o#private_flag _x_i4 in
-        let o = o#option (fun o -> o#core_type) _x_i5 in
-        let o =
-          o#list
-            (fun o (_x, _x_i1) ->
-               let o = o#bool _x in let o = o#bool _x_i1 in o)
-            _x_i6 in
-        let o = o#unknown _x_i7 in o
-    method structure_item_desc : structure_item_desc -> 'self_type =
-      function
-      | Tstr_eval _x -> let o = o#expression _x in o
-      | Tstr_value (_x, _x_i1) ->
-          let o = o#rec_flag _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#pattern _x in let o = o#expression _x_i1 in o)
-              _x_i1
-          in o
-      | Tstr_primitive (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#value_description _x_i2 in o
-      | Tstr_type _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#type_declaration _x_i2 in o)
-              _x
-          in o
-      | Tstr_exception (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#exception_declaration _x_i2 in o
-      | Tstr_exn_rebind (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#unknown _x_i2 in
-          let o = o#loc (fun o -> o#unknown) _x_i3 in o
-      | Tstr_module (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#module_expr _x_i2 in o
-      | Tstr_recmodule _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2, _x_i3) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#module_type _x_i2 in
-                 let o = o#module_expr _x_i3 in o)
-              _x
-          in o
-      | Tstr_modtype (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#module_type _x_i2 in o
-      | Tstr_open (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in o
-      | Tstr_class _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#class_declaration _x in
-                 let o = o#list (fun o -> o#string) _x_i1 in
-                 let o = o#virtual_flag _x_i2 in o)
-              _x
-          in o
-      | Tstr_class_type _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#class_type_declaration _x_i2 in o)
-              _x
-          in o
-      | Tstr_include (_x, _x_i1) ->
-          let o = o#module_expr _x in
-          let o = o#list (fun o -> o#unknown) _x_i1 in o
-    method structure_item : structure_item -> 'self_type =
-      fun { str_desc = _x; str_loc = _x_i1; str_env = _x_i2 } ->
-        let o = o#structure_item_desc _x in
-        let o = o#unknown _x_i1 in let o = o#unknown _x_i2 in o
-    method structure : structure -> 'self_type =
-      fun { str_items = _x; str_type = _x_i1; str_final_env = _x_i2 } ->
-        let o = o#list (fun o -> o#structure_item) _x in
-        let o = o#unknown _x_i1 in let o = o#unknown _x_i2 in o
-    method signature_item_desc : signature_item_desc -> 'self_type =
-      function
-      | Tsig_value (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#value_description _x_i2 in o
-      | Tsig_type _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#type_declaration _x_i2 in o)
-              _x
-          in o
-      | Tsig_exception (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#exception_declaration _x_i2 in o
-      | Tsig_module (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#module_type _x_i2 in o
-      | Tsig_recmodule _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#module_type _x_i2 in o)
-              _x
-          in o
-      | Tsig_modtype (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#modtype_declaration _x_i2 in o
-      | Tsig_open (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in o
-      | Tsig_include (_x, _x_i1) ->
-          let o = o#module_type _x in let o = o#unknown _x_i1 in o
-      | Tsig_class _x ->
-          let o = o#list (fun o -> o#class_description) _x in o
-      | Tsig_class_type _x ->
-          let o = o#list (fun o -> o#class_type_declaration) _x in o
-    method signature_item : signature_item -> 'self_type =
-      fun { sig_desc = _x; sig_env = _x_i1; sig_loc = _x_i2 } ->
-        let o = o#signature_item_desc _x in
-        let o = o#unknown _x_i1 in let o = o#unknown _x_i2 in o
-    method signature : signature -> 'self_type =
-      fun { sig_items = _x; sig_type = _x_i1; sig_final_env = _x_i2 } ->
-        let o = o#list (fun o -> o#signature_item) _x in
-        let o = o#unknown _x_i1 in let o = o#unknown _x_i2 in o
-    method row_field : row_field -> 'self_type =
-      function
-      | Ttag (_x, _x_i1, _x_i2) ->
-          let o = o#label _x in
-          let o = o#bool _x_i1 in
-          let o = o#list (fun o -> o#core_type) _x_i2 in o
-      | Tinherit _x -> let o = o#core_type _x in o
-    method row_desc : row_desc -> 'self_type = o#unknown
-    method rec_flag : rec_flag -> 'self_type = o#unknown
-    method private_flag : private_flag -> 'self_type = o#unknown
-    method pattern_desc : pattern_desc -> 'self_type =
-      function
-      | Tpat_any -> o
-      | Tpat_var (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in o
-      | Tpat_alias (_x, _x_i1, _x_i2) ->
-          let o = o#pattern _x in
-          let o = o#unknown _x_i1 in
-          let o = o#loc (fun o -> o#string) _x_i2 in o
-      | Tpat_constant _x -> let o = o#constant _x in o
-      | Tpat_tuple _x -> let o = o#list (fun o -> o#pattern) _x in o
-      | Tpat_construct (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#constructor_description _x_i2 in
-          let o = o#list (fun o -> o#pattern) _x_i3 in
-          let o = o#bool _x_i4 in o
-      | Tpat_variant (_x, _x_i1, _x_i2) ->
-          let o = o#label _x in
-          let o = o#option (fun o -> o#pattern) _x_i1 in
-          let o = o#ref (fun o -> o#row_desc) _x_i2 in o
-      | Tpat_record (_x, _x_i1) ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2, _x_i3) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#unknown) _x_i1 in
-                 let o = o#label_description _x_i2 in
-                 let o = o#pattern _x_i3 in o)
-              _x in
-          let o = o#closed_flag _x_i1 in o
-      | Tpat_array _x -> let o = o#list (fun o -> o#pattern) _x in o
-      | Tpat_or (_x, _x_i1, _x_i2) ->
-          let o = o#pattern _x in
-          let o = o#pattern _x_i1 in
-          let o = o#option (fun o -> o#row_desc) _x_i2 in o
-      | Tpat_lazy _x -> let o = o#pattern _x in o
-    method pattern : pattern -> 'self_type =
-      fun
-        {
-          pat_desc = _x;
-          pat_loc = _x_i1;
-          pat_extra = _x_i2;
-          pat_type = _x_i3;
-          pat_env = _x_i4
-        } ->
-        let o = o#pattern_desc _x in
-        let o = o#unknown _x_i1 in
-        let o =
-          o#list
-            (fun o (_x, _x_i1) ->
-               let o = o#pat_extra _x in let o = o#unknown _x_i1 in o)
-            _x_i2 in
-        let o = o#type_expr _x_i3 in let o = o#unknown _x_i4 in o
-    method pat_extra : pat_extra -> 'self_type =
-      function
-      | Tpat_constraint _x -> let o = o#core_type _x in o
-      | Tpat_type (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in o
-      | Tpat_unpack -> o
-    method partial : partial -> 'self_type =
-      function | Partial -> o | Total -> o
-    method package_type : package_type -> 'self_type =
-      fun
-        {
-          pack_name = _x;
-          pack_fields = _x_i1;
-          pack_type = _x_i2;
-          pack_txt = _x_i3
-        } ->
-        let o = o#unknown _x in
-        let o =
-          o#list
-            (fun o (_x, _x_i1) ->
-               let o = o#loc (fun o -> o#unknown) _x in
-               let o = o#core_type _x_i1 in o)
-            _x_i1 in
-        let o = o#unknown _x_i2 in
-        let o = o#loc (fun o -> o#unknown) _x_i3 in o
-    method override_flag : override_flag -> 'self_type = o#unknown
-    method optional : optional -> 'self_type =
-      function | Required -> o | Optional -> o
-    method mutable_flag : mutable_flag -> 'self_type = o#unknown
-    method module_type_desc : module_type_desc -> 'self_type =
-      function
-      | Tmty_ident (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in o
-      | Tmty_signature _x -> let o = o#signature _x in o
-      | Tmty_functor (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#module_type _x_i2 in let o = o#module_type _x_i3 in o
-      | Tmty_with (_x, _x_i1) ->
-          let o = o#module_type _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#unknown) _x_i1 in
-                 let o = o#with_constraint _x_i2 in o)
-              _x_i1
-          in o
-      | Tmty_typeof _x -> let o = o#module_expr _x in o
-    method module_type_constraint : module_type_constraint -> 'self_type =
-      function
-      | Tmodtype_implicit -> o
-      | Tmodtype_explicit _x -> let o = o#module_type _x in o
-    method module_type : module_type -> 'self_type =
-      fun { mty_desc = _x; mty_type = _x_i1; mty_env = _x_i2; mty_loc = _x_i3
-        } ->
-        let o = o#module_type_desc _x in
-        let o = o#unknown _x_i1 in
-        let o = o#unknown _x_i2 in let o = o#unknown _x_i3 in o
-    method module_expr_desc : module_expr_desc -> 'self_type =
-      function
-      | Tmod_ident (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in o
-      | Tmod_structure _x -> let o = o#structure _x in o
-      | Tmod_functor (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#module_type _x_i2 in let o = o#module_expr _x_i3 in o
-      | Tmod_apply (_x, _x_i1, _x_i2) ->
-          let o = o#module_expr _x in
-          let o = o#module_expr _x_i1 in let o = o#module_coercion _x_i2 in o
-      | Tmod_constraint (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#module_expr _x in
-          let o = o#unknown _x_i1 in
-          let o = o#module_type_constraint _x_i2 in
-          let o = o#module_coercion _x_i3 in o
-      | Tmod_unpack (_x, _x_i1) ->
-          let o = o#expression _x in let o = o#unknown _x_i1 in o
-    method module_expr : module_expr -> 'self_type =
-      fun { mod_desc = _x; mod_loc = _x_i1; mod_type = _x_i2; mod_env = _x_i3
-        } ->
-        let o = o#module_expr_desc _x in
-        let o = o#unknown _x_i1 in
-        let o = o#unknown _x_i2 in let o = o#unknown _x_i3 in o
-    method module_coercion : module_coercion -> 'self_type =
-      function
-      | Tcoerce_none -> o
-      | Tcoerce_structure _x ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#int _x in let o = o#module_coercion _x_i1 in o)
-              _x
-          in o
-      | Tcoerce_functor (_x, _x_i1) ->
-          let o = o#module_coercion _x in
-          let o = o#module_coercion _x_i1 in o
-      | Tcoerce_primitive _x -> let o = o#unknown _x in o
-    method modtype_declaration : modtype_declaration -> 'self_type =
-      function
-      | Tmodtype_abstract -> o
-      | Tmodtype_manifest _x -> let o = o#module_type _x in o
-    method meth : meth -> 'self_type =
-      function
-      | Tmeth_name _x -> let o = o#string _x in o
-      | Tmeth_val _x -> let o = o#unknown _x in o
-    method loc :
-      'a. ('self_type -> 'a -> 'self_type) -> 'a loc -> 'self_type =
-      fun _f_a -> o#unknown
-    method label_description : label_description -> 'self_type = o#unknown
-    method label : label -> 'self_type = o#unknown
-    method expression_desc : expression_desc -> 'self_type =
-      function
-      | Texp_ident (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#unknown _x_i2 in o
-      | Texp_constant _x -> let o = o#constant _x in o
-      | Texp_let (_x, _x_i1, _x_i2) ->
-          let o = o#rec_flag _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#pattern _x in let o = o#expression _x_i1 in o)
-              _x_i1 in
-          let o = o#expression _x_i2 in o
-      | Texp_function (_x, _x_i1, _x_i2) ->
-          let o = o#label _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#pattern _x in let o = o#expression _x_i1 in o)
-              _x_i1 in
-          let o = o#partial _x_i2 in o
-      | Texp_apply (_x, _x_i1) ->
-          let o = o#expression _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#label _x in
-                 let o = o#option (fun o -> o#expression) _x_i1 in
-                 let o = o#optional _x_i2 in o)
-              _x_i1
-          in o
-      | Texp_match (_x, _x_i1, _x_i2) ->
-          let o = o#expression _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#pattern _x in let o = o#expression _x_i1 in o)
-              _x_i1 in
-          let o = o#partial _x_i2 in o
-      | Texp_try (_x, _x_i1) ->
-          let o = o#expression _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#pattern _x in let o = o#expression _x_i1 in o)
-              _x_i1
-          in o
-      | Texp_tuple _x -> let o = o#list (fun o -> o#expression) _x in o
-      | Texp_construct (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#constructor_description _x_i2 in
-          let o = o#list (fun o -> o#expression) _x_i3 in
-          let o = o#bool _x_i4 in o
-      | Texp_variant (_x, _x_i1) ->
-          let o = o#label _x in
-          let o = o#option (fun o -> o#expression) _x_i1 in o
-      | Texp_record (_x, _x_i1) ->
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2, _x_i3) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#unknown) _x_i1 in
-                 let o = o#label_description _x_i2 in
-                 let o = o#expression _x_i3 in o)
-              _x in
-          let o = o#option (fun o -> o#expression) _x_i1 in o
-      | Texp_field (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#expression _x in
-          let o = o#unknown _x_i1 in
-          let o = o#loc (fun o -> o#unknown) _x_i2 in
-          let o = o#label_description _x_i3 in o
-      | Texp_setfield (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-          let o = o#expression _x in
-          let o = o#unknown _x_i1 in
-          let o = o#loc (fun o -> o#unknown) _x_i2 in
-          let o = o#label_description _x_i3 in
-          let o = o#expression _x_i4 in o
-      | Texp_array _x -> let o = o#list (fun o -> o#expression) _x in o
-      | Texp_ifthenelse (_x, _x_i1, _x_i2) ->
-          let o = o#expression _x in
-          let o = o#expression _x_i1 in
-          let o = o#option (fun o -> o#expression) _x_i2 in o
-      | Texp_sequence (_x, _x_i1) ->
-          let o = o#expression _x in let o = o#expression _x_i1 in o
-      | Texp_while (_x, _x_i1) ->
-          let o = o#expression _x in let o = o#expression _x_i1 in o
-      | Texp_for (_x, _x_i1, _x_i2, _x_i3, _x_i4, _x_i5) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#expression _x_i2 in
-          let o = o#expression _x_i3 in
-          let o = o#direction_flag _x_i4 in let o = o#expression _x_i5 in o
-      | Texp_when (_x, _x_i1) ->
-          let o = o#expression _x in let o = o#expression _x_i1 in o
-      | Texp_send (_x, _x_i1, _x_i2) ->
-          let o = o#expression _x in
-          let o = o#meth _x_i1 in
-          let o = o#option (fun o -> o#expression) _x_i2 in o
-      | Texp_new (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#unknown _x_i2 in o
-      | Texp_instvar (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#unknown _x_i1 in
-          let o = o#loc (fun o -> o#string) _x_i2 in o
-      | Texp_setinstvar (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#unknown _x in
-          let o = o#unknown _x_i1 in
-          let o = o#loc (fun o -> o#string) _x_i2 in
-          let o = o#expression _x_i3 in o
-      | Texp_override (_x, _x_i1) ->
-          let o = o#unknown _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#expression _x_i2 in o)
-              _x_i1
-          in o
-      | Texp_letmodule (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#module_expr _x_i2 in let o = o#expression _x_i3 in o
-      | Texp_assert _x -> let o = o#expression _x in o
-      | Texp_assertfalse -> o
-      | Texp_lazy _x -> let o = o#expression _x in o
-      | Texp_object (_x, _x_i1) ->
-          let o = o#class_structure _x in
-          let o = o#list (fun o -> o#string) _x_i1 in o
-      | Texp_pack _x -> let o = o#module_expr _x in o
-    method expression : expression -> 'self_type =
-      fun
-        {
-          exp_desc = _x;
-          exp_loc = _x_i1;
-          exp_extra = _x_i2;
-          exp_type = _x_i3;
-          exp_env = _x_i4
-        } ->
-        let o = o#expression_desc _x in
-        let o = o#unknown _x_i1 in
-        let o =
-          o#list
-            (fun o (_x, _x_i1) ->
-               let o = o#exp_extra _x in let o = o#unknown _x_i1 in o)
-            _x_i2 in
-        let o = o#type_expr _x_i3 in let o = o#unknown _x_i4 in o
-    method exp_extra : exp_extra -> 'self_type =
-      function
-      | Texp_constraint (_x, _x_i1) ->
-          let o = o#option (fun o -> o#core_type) _x in
-          let o = o#option (fun o -> o#core_type) _x_i1 in o
-      | Texp_open (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#unknown _x_i2 in o
-      | Texp_poly _x_i1 ->
-          let o = o#option (fun o -> o#core_type) _x_i1 in o
-      | Texp_newtype _x ->
-          let o = o#string _x in o
-    method exception_declaration : exception_declaration -> 'self_type =
-      fun { exn_params = _x; exn_exn = _x_i1; exn_loc = _x_i2 } ->
-        let o = o#list (fun o -> o#core_type) _x in
-        let o = o#unknown _x_i1 in let o = o#unknown _x_i2 in o
-    method direction_flag : direction_flag -> 'self_type = o#unknown
-    method core_type_desc : core_type_desc -> 'self_type =
-      function
-      | Ttyp_any -> o
-      | Ttyp_var _x -> let o = o#string _x in o
-      | Ttyp_arrow (_x, _x_i1, _x_i2) ->
-          let o = o#label _x in
-          let o = o#core_type _x_i1 in let o = o#core_type _x_i2 in o
-      | Ttyp_tuple _x -> let o = o#list (fun o -> o#core_type) _x in o
-      | Ttyp_constr (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#list (fun o -> o#core_type) _x_i2 in o
-      | Ttyp_object _x -> let o = o#list (fun o -> o#core_field_type) _x in o
-      | Ttyp_class (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#list (fun o -> o#core_type) _x_i2 in
-          let o = o#list (fun o -> o#label) _x_i3 in o
-      | Ttyp_alias (_x, _x_i1) ->
-          let o = o#core_type _x in let o = o#string _x_i1 in o
-      | Ttyp_variant (_x, _x_i1, _x_i2) ->
-          let o = o#list (fun o -> o#row_field) _x in
-          let o = o#bool _x_i1 in
-          let o = o#option (fun o -> o#list (fun o -> o#label)) _x_i2 in o
-      | Ttyp_poly (_x, _x_i1) ->
-          let o = o#list (fun o -> o#string) _x in
-          let o = o#core_type _x_i1 in o
-      | Ttyp_package _x -> let o = o#package_type _x in o
-    method core_type : core_type -> 'self_type =
-      fun
-        {
-          ctyp_desc = _x;
-          ctyp_type = _x_i1;
-          ctyp_env = _x_i2;
-          ctyp_loc = _x_i3
-        } ->
-        let o = o#core_type_desc _x in
-        let o = o#type_expr _x_i1 in
-        let o = o#unknown _x_i2 in let o = o#unknown _x_i3 in o
-    method core_field_type : core_field_type -> 'self_type =
-      fun { field_desc = _x; field_loc = _x_i1 } ->
-        let o = o#core_field_desc _x in let o = o#unknown _x_i1 in o
-    method core_field_desc : core_field_desc -> 'self_type =
-      function
-      | Tcfield (_x, _x_i1) ->
-          let o = o#string _x in let o = o#core_type _x_i1 in o
-      | Tcfield_var -> o
-    method constructor_description : constructor_description -> 'self_type =
-      o#unknown
-    method constant : constant -> 'self_type = o#unknown
-    method closed_flag : closed_flag -> 'self_type = o#unknown
-    method class_type_field_desc : class_type_field_desc -> 'self_type =
-      function
-      | Tctf_inher _x -> let o = o#class_type _x in o
-      | Tctf_val _x ->
-          let o =
-            (fun (_x, _x_i1, _x_i2, _x_i3) ->
-               let o = o#string _x in
-               let o = o#mutable_flag _x_i1 in
-               let o = o#virtual_flag _x_i2 in let o = o#core_type _x_i3 in o)
-              _x
-          in o
-      | Tctf_virt _x ->
-          let o =
-            (fun (_x, _x_i1, _x_i2) ->
-               let o = o#string _x in
-               let o = o#private_flag _x_i1 in let o = o#core_type _x_i2 in o)
-              _x
-          in o
-      | Tctf_meth _x ->
-          let o =
-            (fun (_x, _x_i1, _x_i2) ->
-               let o = o#string _x in
-               let o = o#private_flag _x_i1 in let o = o#core_type _x_i2 in o)
-              _x
-          in o
-      | Tctf_cstr _x ->
-          let o =
-            (fun (_x, _x_i1) ->
-               let o = o#core_type _x in let o = o#core_type _x_i1 in o)
-              _x
-          in o
-    method class_type_field : class_type_field -> 'self_type =
-      fun { ctf_desc = _x; ctf_loc = _x_i1 } ->
-        let o = o#class_type_field_desc _x in let o = o#unknown _x_i1 in o
-    method class_type_desc : class_type_desc -> 'self_type =
-      function
-      | Tcty_constr (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#list (fun o -> o#core_type) _x_i2 in o
-      | Tcty_signature _x -> let o = o#class_signature _x in o
-      | Tcty_fun (_x, _x_i1, _x_i2) ->
-          let o = o#label _x in
-          let o = o#core_type _x_i1 in let o = o#class_type _x_i2 in o
-    method class_type_declaration : class_type_declaration -> 'self_type =
-      o#class_infos (fun o -> o#class_type)
-    method class_type : class_type -> 'self_type =
-      fun
-        {
-          cltyp_desc = _x;
-          cltyp_type = _x_i1;
-          cltyp_env = _x_i2;
-          cltyp_loc = _x_i3
-        } ->
-        let o = o#class_type_desc _x in
-        let o = o#unknown _x_i1 in
-        let o = o#unknown _x_i2 in let o = o#unknown _x_i3 in o
-    method class_structure : class_structure -> 'self_type =
-      fun
-        {
-          cstr_pat = _x;
-          cstr_fields = _x_i1;
-          cstr_type = _x_i2;
-          cstr_meths = _x_i3
-        } ->
-        let o = o#pattern _x in
-        let o = o#list (fun o -> o#class_field) _x_i1 in
-        let o = o#unknown _x_i2 in let o = o#unknown _x_i3 in o
-    method class_signature : class_signature -> 'self_type =
-      fun
-        {
-          csig_self = _x;
-          csig_fields = _x_i1;
-          csig_type = _x_i2;
-          csig_loc = _x_i3
-        } ->
-        let o = o#core_type _x in
-        let o = o#list (fun o -> o#class_type_field) _x_i1 in
-        let o = o#unknown _x_i2 in let o = o#unknown _x_i3 in o
+  object ((self : 'self))
+    method ref : 'a1. ('self -> 'a1 -> 'self) -> 'a1 ref -> 'self = 
+      fun fa r -> fa self !r
+    method option : 'a1. ('self -> 'a1 -> 'self) -> 'a1 option -> 'self =
+      fun fa -> function
+        | None -> self
+        | Some v -> fa self v 
+    method list : 'a1. ('self -> 'a1 -> 'self) -> 'a1 list -> 'self =
+      fun fa l -> List.fold_left fa self l
+    method pattern : pattern -> 'self =
+      fun __value ->
+        let self = self#pattern_desc __value.pat_desc in
+        let self =
+          self#list
+            (fun self (__x1, __x2) -> let self = self#pat_extra __x1 in self)
+            __value.pat_extra
+        in self
+    method pat_extra : pat_extra -> 'self =
+      fun __value ->
+        match __value with
+        | Tpat_constraint __x1 -> let self = self#core_type __x1 in self
+        | Tpat_type (__x1, __x2) -> self
+        | Tpat_unpack -> self
+    method pattern_desc : pattern_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tpat_any -> self
+        | Tpat_var (__x1, __x2) -> self
+        | Tpat_alias (__x1, __x2, __x3) ->
+            let self = self#pattern __x1 in self
+        | Tpat_constant __x1 -> self
+        | Tpat_tuple __x1 ->
+            let self = self#list (fun self -> self#pattern) __x1 in self
+        | Tpat_construct (__x1, __x2, __x3, __x4, __x5) ->
+            let self = self#list (fun self -> self#pattern) __x4 in self
+        | Tpat_variant (__x1, __x2, __x3) ->
+            let self = self#option (fun self -> self#pattern) __x2 in
+            let self = self#ref (fun self _ -> self) __x3 in self
+        | Tpat_record (__x1, __x2) ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3, __x4) ->
+                   let self = self#pattern __x4 in self)
+                __x1
+            in self
+        | Tpat_array __x1 ->
+            let self = self#list (fun self -> self#pattern) __x1 in self
+        | Tpat_or (__x1, __x2, __x3) ->
+            let self = self#pattern __x1 in
+            let self = self#pattern __x2 in
+            let self = self#option (fun self _ -> self) __x3 in self
+        | Tpat_lazy __x1 -> let self = self#pattern __x1 in self
+    method expression : expression -> 'self =
+      fun __value ->
+        let self = self#expression_desc __value.exp_desc in
+        let self =
+          self#list
+            (fun self (__x1, __x2) -> let self = self#exp_extra __x1 in self)
+            __value.exp_extra
+        in self
+    method exp_extra : exp_extra -> 'self =
+      fun __value ->
+        match __value with
+        | Texp_constraint (__x1, __x2) ->
+            let self = self#option (fun self -> self#core_type) __x1 in
+            let self = self#option (fun self -> self#core_type) __x2 in self
+        | Texp_open (__x1, __x2, __x3) -> self
+        | Texp_poly __x1 ->
+            let self = self#option (fun self -> self#core_type) __x1 in self
+        | Texp_newtype __x1 -> self
+    method expression_desc : expression_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Texp_ident (__x1, __x2, __x3) -> self
+        | Texp_constant __x1 -> self
+        | Texp_let (__x1, __x2, __x3) ->
+            let self =
+              self#list
+                (fun self (__x1, __x2) ->
+                   let self = self#pattern __x1 in
+                   let self = self#expression __x2 in self)
+                __x2 in
+            let self = self#expression __x3 in self
+        | Texp_function (__x1, __x2, __x3) ->
+            let self =
+              self#list
+                (fun self (__x1, __x2) ->
+                   let self = self#pattern __x1 in
+                   let self = self#expression __x2 in self)
+                __x2
+            in self
+        | Texp_apply (__x1, __x2) ->
+            let self = self#expression __x1 in
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#option (fun self -> self#expression) __x2
+                   in self)
+                __x2
+            in self
+        | Texp_match (__x1, __x2, __x3) ->
+            let self = self#expression __x1 in
+            let self =
+              self#list
+                (fun self (__x1, __x2) ->
+                   let self = self#pattern __x1 in
+                   let self = self#expression __x2 in self)
+                __x2
+            in self
+        | Texp_try (__x1, __x2) ->
+            let self = self#expression __x1 in
+            let self =
+              self#list
+                (fun self (__x1, __x2) ->
+                   let self = self#pattern __x1 in
+                   let self = self#expression __x2 in self)
+                __x2
+            in self
+        | Texp_tuple __x1 ->
+            let self = self#list (fun self -> self#expression) __x1 in self
+        | Texp_construct (__x1, __x2, __x3, __x4, __x5) ->
+            let self = self#list (fun self -> self#expression) __x4 in self
+        | Texp_variant (__x1, __x2) ->
+            let self = self#option (fun self -> self#expression) __x2 in self
+        | Texp_record (__x1, __x2) ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3, __x4) ->
+                   let self = self#expression __x4 in self)
+                __x1 in
+            let self = self#option (fun self -> self#expression) __x2 in self
+        | Texp_field (__x1, __x2, __x3, __x4) ->
+            let self = self#expression __x1 in self
+        | Texp_setfield (__x1, __x2, __x3, __x4, __x5) ->
+            let self = self#expression __x1 in
+            let self = self#expression __x5 in self
+        | Texp_array __x1 ->
+            let self = self#list (fun self -> self#expression) __x1 in self
+        | Texp_ifthenelse (__x1, __x2, __x3) ->
+            let self = self#expression __x1 in
+            let self = self#expression __x2 in
+            let self = self#option (fun self -> self#expression) __x3 in self
+        | Texp_sequence (__x1, __x2) ->
+            let self = self#expression __x1 in
+            let self = self#expression __x2 in self
+        | Texp_while (__x1, __x2) ->
+            let self = self#expression __x1 in
+            let self = self#expression __x2 in self
+        | Texp_for (__x1, __x2, __x3, __x4, __x5, __x6) ->
+            let self = self#expression __x3 in
+            let self = self#expression __x4 in
+            let self = self#expression __x6 in self
+        | Texp_when (__x1, __x2) ->
+            let self = self#expression __x1 in
+            let self = self#expression __x2 in self
+        | Texp_send (__x1, __x2, __x3) ->
+            let self = self#expression __x1 in
+            let self = self#meth __x2 in
+            let self = self#option (fun self -> self#expression) __x3 in self
+        | Texp_new (__x1, __x2, __x3) -> self
+        | Texp_instvar (__x1, __x2, __x3) -> self
+        | Texp_setinstvar (__x1, __x2, __x3, __x4) ->
+            let self = self#expression __x4 in self
+        | Texp_override (__x1, __x2) ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#expression __x3 in self)
+                __x2
+            in self
+        | Texp_letmodule (__x1, __x2, __x3, __x4) ->
+            let self = self#module_expr __x3 in
+            let self = self#expression __x4 in self
+        | Texp_assert __x1 -> let self = self#expression __x1 in self
+        | Texp_assertfalse -> self
+        | Texp_lazy __x1 -> let self = self#expression __x1 in self
+        | Texp_object (__x1, __x2) ->
+            let self = self#class_structure __x1 in
+            let self = self#list (fun self _ -> self) __x2 in self
+        | Texp_pack __x1 -> let self = self#module_expr __x1 in self
+    method meth : meth -> 'self = fun __value -> self
+    method class_expr : class_expr -> 'self =
+      fun __value -> let self = self#class_expr_desc __value.cl_desc in self
+    method class_expr_desc : class_expr_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tcl_ident (__x1, __x2, __x3) ->
+            let self = self#list (fun self -> self#core_type) __x3 in self
+        | Tcl_structure __x1 -> let self = self#class_structure __x1 in self
+        | Tcl_fun (__x1, __x2, __x3, __x4, __x5) ->
+            let self = self#pattern __x2 in
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#expression __x3 in self)
+                __x3 in
+            let self = self#class_expr __x4 in self
+        | Tcl_apply (__x1, __x2) ->
+            let self = self#class_expr __x1 in
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#option (fun self -> self#expression) __x2
+                   in self)
+                __x2
+            in self
+        | Tcl_let (__x1, __x2, __x3, __x4) ->
+            let self =
+              self#list
+                (fun self (__x1, __x2) ->
+                   let self = self#pattern __x1 in
+                   let self = self#expression __x2 in self)
+                __x2 in
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#expression __x3 in self)
+                __x3 in
+            let self = self#class_expr __x4 in self
+        | Tcl_constraint (__x1, __x2, __x3, __x4, __x5) ->
+            let self = self#class_expr __x1 in
+            let self = self#option (fun self -> self#class_type) __x2 in
+            let self = self#list (fun self _ -> self) __x3 in
+            let self = self#list (fun self _ -> self) __x4 in self
+    method class_structure : class_structure -> 'self =
+      fun __value ->
+        let self = self#pattern __value.cstr_pat in
+        let self =
+          self#list (fun self -> self#class_field) __value.cstr_fields
+        in self
+    method class_field : class_field -> 'self =
+      fun __value -> let self = self#class_field_desc __value.cf_desc in self
+    method class_field_kind : class_field_kind -> 'self =
+      fun __value ->
+        match __value with
+        | Tcfk_virtual __x1 -> let self = self#core_type __x1 in self
+        | Tcfk_concrete __x1 -> let self = self#expression __x1 in self
+    method class_field_desc : class_field_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tcf_inher (__x1, __x2, __x3, __x4, __x5) ->
+            let self = self#class_expr __x2 in
+            let self = self#option (fun self _ -> self) __x3 in
+            let self = self#list (fun self (__x1, __x2) -> self) __x4 in
+            let self = self#list (fun self (__x1, __x2) -> self) __x5 in self
+        | Tcf_val (__x1, __x2, __x3, __x4, __x5, __x6) ->
+            let self = self#class_field_kind __x5 in self
+        | Tcf_meth (__x1, __x2, __x3, __x4, __x5) ->
+            let self = self#class_field_kind __x4 in self
+        | Tcf_constr (__x1, __x2) ->
+            let self = self#core_type __x1 in
+            let self = self#core_type __x2 in self
+        | Tcf_init __x1 -> let self = self#expression __x1 in self
+    method module_expr : module_expr -> 'self =
+      fun __value ->
+        let self = self#module_expr_desc __value.mod_desc in self
+    method module_type_constraint : module_type_constraint -> 'self =
+      fun __value ->
+        match __value with
+        | Tmodtype_implicit -> self
+        | Tmodtype_explicit __x1 -> let self = self#module_type __x1 in self
+    method module_expr_desc : module_expr_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tmod_ident (__x1, __x2) -> self
+        | Tmod_structure __x1 -> let self = self#structure __x1 in self
+        | Tmod_functor (__x1, __x2, __x3, __x4) ->
+            let self = self#module_type __x3 in
+            let self = self#module_expr __x4 in self
+        | Tmod_apply (__x1, __x2, __x3) ->
+            let self = self#module_expr __x1 in
+            let self = self#module_expr __x2 in
+            let self = self#module_coercion __x3 in self
+        | Tmod_constraint (__x1, __x2, __x3, __x4) ->
+            let self = self#module_expr __x1 in
+            let self = self#module_type_constraint __x3 in
+            let self = self#module_coercion __x4 in self
+        | Tmod_unpack (__x1, __x2) -> let self = self#expression __x1 in self
+    method structure : structure -> 'self =
+      fun __value ->
+        let self =
+          self#list (fun self -> self#structure_item) __value.str_items
+        in self
+    method structure_item : structure_item -> 'self =
+      fun __value ->
+        let self = self#structure_item_desc __value.str_desc in self
+    method structure_item_desc : structure_item_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tstr_eval __x1 -> let self = self#expression __x1 in self
+        | Tstr_value (__x1, __x2) ->
+            let self =
+              self#list
+                (fun self (__x1, __x2) ->
+                   let self = self#pattern __x1 in
+                   let self = self#expression __x2 in self)
+                __x2
+            in self
+        | Tstr_primitive (__x1, __x2, __x3) ->
+            let self = self#value_description __x3 in self
+        | Tstr_type __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#type_declaration __x3 in self)
+                __x1
+            in self
+        | Tstr_exception (__x1, __x2, __x3) ->
+            let self = self#exception_declaration __x3 in self
+        | Tstr_exn_rebind (__x1, __x2, __x3, __x4) -> self
+        | Tstr_module (__x1, __x2, __x3) ->
+            let self = self#module_expr __x3 in self
+        | Tstr_recmodule __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3, __x4) ->
+                   let self = self#module_type __x3 in
+                   let self = self#module_expr __x4 in self)
+                __x1
+            in self
+        | Tstr_modtype (__x1, __x2, __x3) ->
+            let self = self#module_type __x3 in self
+        | Tstr_open (__x1, __x2) -> self
+        | Tstr_class __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#class_declaration __x1 in
+                   let self = self#list (fun self _ -> self) __x2 in self)
+                __x1
+            in self
+        | Tstr_class_type __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#class_type_declaration __x3 in self)
+                __x1
+            in self
+        | Tstr_include (__x1, __x2) ->
+            let self = self#module_expr __x1 in
+            let self = self#list (fun self _ -> self) __x2 in self
+    method module_coercion : module_coercion -> 'self =
+      fun __value ->
+        match __value with
+        | Tcoerce_none -> self
+        | Tcoerce_structure __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2) ->
+                   let self = self#module_coercion __x2 in self)
+                __x1
+            in self
+        | Tcoerce_functor (__x1, __x2) ->
+            let self = self#module_coercion __x1 in
+            let self = self#module_coercion __x2 in self
+        | Tcoerce_primitive __x1 -> self
+    method module_type : module_type -> 'self =
+      fun __value ->
+        let self = self#module_type_desc __value.mty_desc in self
+    method module_type_desc : module_type_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tmty_ident (__x1, __x2) -> self
+        | Tmty_signature __x1 -> let self = self#signature __x1 in self
+        | Tmty_functor (__x1, __x2, __x3, __x4) ->
+            let self = self#module_type __x3 in
+            let self = self#module_type __x4 in self
+        | Tmty_with (__x1, __x2) ->
+            let self = self#module_type __x1 in
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#with_constraint __x3 in self)
+                __x2
+            in self
+        | Tmty_typeof __x1 -> let self = self#module_expr __x1 in self
+    method signature : signature -> 'self =
+      fun __value ->
+        let self =
+          self#list (fun self -> self#signature_item) __value.sig_items
+        in self
+    method signature_item : signature_item -> 'self =
+      fun __value ->
+        let self = self#signature_item_desc __value.sig_desc in self
+    method signature_item_desc : signature_item_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tsig_value (__x1, __x2, __x3) ->
+            let self = self#value_description __x3 in self
+        | Tsig_type __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#type_declaration __x3 in self)
+                __x1
+            in self
+        | Tsig_exception (__x1, __x2, __x3) ->
+            let self = self#exception_declaration __x3 in self
+        | Tsig_module (__x1, __x2, __x3) ->
+            let self = self#module_type __x3 in self
+        | Tsig_recmodule __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3) ->
+                   let self = self#module_type __x3 in self)
+                __x1
+            in self
+        | Tsig_modtype (__x1, __x2, __x3) ->
+            let self = self#modtype_declaration __x3 in self
+        | Tsig_open (__x1, __x2) -> self
+        | Tsig_include (__x1, __x2) ->
+            let self = self#module_type __x1 in self
+        | Tsig_class __x1 ->
+            let self = self#list (fun self -> self#class_description) __x1
+            in self
+        | Tsig_class_type __x1 ->
+            let self =
+              self#list (fun self -> self#class_type_declaration) __x1
+            in self
+    method modtype_declaration : modtype_declaration -> 'self =
+      fun __value ->
+        match __value with
+        | Tmodtype_abstract -> self
+        | Tmodtype_manifest __x1 -> let self = self#module_type __x1 in self
+    method with_constraint : with_constraint -> 'self =
+      fun __value ->
+        match __value with
+        | Twith_type __x1 -> let self = self#type_declaration __x1 in self
+        | Twith_module (__x1, __x2) -> self
+        | Twith_typesubst __x1 ->
+            let self = self#type_declaration __x1 in self
+        | Twith_modsubst (__x1, __x2) -> self
+    method core_type : core_type -> 'self =
+      fun __value -> let self = self#core_type_desc __value.ctyp_desc in self
+    method core_type_desc : core_type_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Ttyp_any -> self
+        | Ttyp_var __x1 -> self
+        | Ttyp_arrow (__x1, __x2, __x3) ->
+            let self = self#core_type __x2 in
+            let self = self#core_type __x3 in self
+        | Ttyp_tuple __x1 ->
+            let self = self#list (fun self -> self#core_type) __x1 in self
+        | Ttyp_constr (__x1, __x2, __x3) ->
+            let self = self#list (fun self -> self#core_type) __x3 in self
+        | Ttyp_object __x1 ->
+            let self = self#list (fun self -> self#core_field_type) __x1
+            in self
+        | Ttyp_class (__x1, __x2, __x3, __x4) ->
+            let self = self#list (fun self -> self#core_type) __x3 in
+            let self = self#list (fun self _ -> self) __x4 in self
+        | Ttyp_alias (__x1, __x2) -> let self = self#core_type __x1 in self
+        | Ttyp_variant (__x1, __x2, __x3) ->
+            let self = self#list (fun self -> self#row_field) __x1 in
+            let self = self#option (fun self -> self#list (fun self _ -> self)) __x3
+            in self
+        | Ttyp_poly (__x1, __x2) ->
+            let self = self#list (fun self _ -> self) __x1 in
+            let self = self#core_type __x2 in self
+        | Ttyp_package __x1 -> let self = self#package_type __x1 in self
+    method package_type : package_type -> 'self =
+      fun __value ->
+        let self =
+          self#list
+            (fun self (__x1, __x2) -> let self = self#core_type __x2 in self)
+            __value.pack_fields
+        in self
+    method core_field_type : core_field_type -> 'self =
+      fun __value ->
+        let self = self#core_field_desc __value.field_desc in self
+    method core_field_desc : core_field_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tcfield (__x1, __x2) -> let self = self#core_type __x2 in self
+        | Tcfield_var -> self
+    method row_field : row_field -> 'self =
+      fun __value ->
+        match __value with
+        | Ttag (__x1, __x2, __x3) ->
+            let self = self#list (fun self -> self#core_type) __x3 in self
+        | Tinherit __x1 -> let self = self#core_type __x1 in self
+    method value_description : value_description -> 'self =
+      fun __value ->
+        let self = self#core_type __value.val_desc in
+        let self = self#list (fun self _ -> self) __value.val_prim in self
+    method type_declaration : type_declaration -> 'self =
+      fun __value ->
+        let self =
+          self#list (fun self -> self#option (fun self _ -> self)) __value.typ_params in
+        let self =
+          self#list
+            (fun self (__x1, __x2, __x3) ->
+               let self = self#core_type __x1 in
+               let self = self#core_type __x2 in self)
+            __value.typ_cstrs in
+        let self = self#type_kind __value.typ_kind in
+        let self =
+          self#option (fun self -> self#core_type) __value.typ_manifest in
+        let self =
+          self#list (fun self (__x1, __x2) -> self) __value.typ_variance
+        in self
+    method type_kind : type_kind -> 'self =
+      fun __value ->
+        match __value with
+        | Ttype_abstract -> self
+        | Ttype_variant __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3, __x4) ->
+                   let self = self#list (fun self -> self#core_type) __x3
+                   in self)
+                __x1
+            in self
+        | Ttype_record __x1 ->
+            let self =
+              self#list
+                (fun self (__x1, __x2, __x3, __x4, __x5) ->
+                   let self = self#core_type __x4 in self)
+                __x1
+            in self
+    method exception_declaration : exception_declaration -> 'self =
+      fun __value ->
+        let self = self#list (fun self -> self#core_type) __value.exn_params
+        in self
+    method class_type : class_type -> 'self =
+      fun __value ->
+        let self = self#class_type_desc __value.cltyp_desc in self
+    method class_type_desc : class_type_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tcty_constr (__x1, __x2, __x3) ->
+            let self = self#list (fun self -> self#core_type) __x3 in self
+        | Tcty_signature __x1 -> let self = self#class_signature __x1 in self
+        | Tcty_fun (__x1, __x2, __x3) ->
+            let self = self#core_type __x2 in
+            let self = self#class_type __x3 in self
+    method class_signature : class_signature -> 'self =
+      fun __value ->
+        let self = self#core_type __value.csig_self in
+        let self =
+          self#list (fun self -> self#class_type_field) __value.csig_fields
+        in self
+    method class_type_field : class_type_field -> 'self =
+      fun __value ->
+        let self = self#class_type_field_desc __value.ctf_desc in self
+    method class_type_field_desc : class_type_field_desc -> 'self =
+      fun __value ->
+        match __value with
+        | Tctf_inher __x1 -> let self = self#class_type __x1 in self
+        | Tctf_val __x1 ->
+            let self =
+              (fun (__x1, __x2, __x3, __x4) ->
+                 let self = self#core_type __x4 in self)
+                __x1
+            in self
+        | Tctf_virt __x1 ->
+            let self =
+              (fun (__x1, __x2, __x3) ->
+                 let self = self#core_type __x3 in self)
+                __x1
+            in self
+        | Tctf_meth __x1 ->
+            let self =
+              (fun (__x1, __x2, __x3) ->
+                 let self = self#core_type __x3 in self)
+                __x1
+            in self
+        | Tctf_cstr __x1 ->
+            let self =
+              (fun (__x1, __x2) ->
+                 let self = self#core_type __x1 in
+                 let self = self#core_type __x2 in self)
+                __x1
+            in self
+    method class_declaration : class_declaration -> 'self =
+      fun __value -> self#class_infos (fun self -> self#class_expr) __value
+    method class_description : class_description -> 'self =
+      fun __value -> self#class_infos (fun self -> self#class_type) __value
+    method class_type_declaration : class_type_declaration -> 'self =
+      fun __value -> self#class_infos (fun self -> self#class_type) __value
     method class_infos :
-      'a. ('self_type -> 'a -> 'self_type) -> 'a class_infos -> 'self_type =
-      fun _f_a
-        {
-          ci_virt = _x;
-          ci_params = _x_i1;
-          ci_id_name = _x_i2;
-          ci_id_class = _x_i3;
-          ci_id_class_type = _x_i4;
-          ci_id_object = _x_i5;
-          ci_id_typesharp = _x_i6;
-          ci_expr = _x_i7;
-          ci_decl = _x_i8;
-          ci_type_decl = _x_i9;
-          ci_variance = _x_i10;
-          ci_loc = _x_i11
-        } ->
-        let o = o#virtual_flag _x in
-        let o =
-          (fun (_x, _x_i1) ->
-             let o = o#list (fun o -> o#loc (fun o -> o#string)) _x in
-             let o = o#unknown _x_i1 in o)
-            _x_i1 in
-        let o = o#loc (fun o -> o#string) _x_i2 in
-        let o = o#unknown _x_i3 in
-        let o = o#unknown _x_i4 in
-        let o = o#unknown _x_i5 in
-        let o = o#unknown _x_i6 in
-        let o = _f_a o _x_i7 in
-        let o = o#unknown _x_i8 in
-        let o = o#unknown _x_i9 in
-        let o =
-          o#list
-            (fun o (_x, _x_i1) ->
-               let o = o#bool _x in let o = o#bool _x_i1 in o)
-            _x_i10 in
-        let o = o#unknown _x_i11 in o
-    method class_field_kind : class_field_kind -> 'self_type =
-      function
-      | Tcfk_virtual _x -> let o = o#core_type _x in o
-      | Tcfk_concrete _x -> let o = o#expression _x in o
-    method class_field_desc : class_field_desc -> 'self_type =
-      function
-      | Tcf_inher (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-          let o = o#override_flag _x in
-          let o = o#class_expr _x_i1 in
-          let o = o#option (fun o -> o#string) _x_i2 in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#string _x in let o = o#unknown _x_i1 in o)
-              _x_i3 in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#string _x in let o = o#unknown _x_i1 in o)
-              _x_i4
-          in o
-      | Tcf_val (_x, _x_i1, _x_i2, _x_i3, _x_i4, _x_i5) ->
-          let o = o#string _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#mutable_flag _x_i2 in
-          let o = o#unknown _x_i3 in
-          let o = o#class_field_kind _x_i4 in let o = o#bool _x_i5 in o
-      | Tcf_meth (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-          let o = o#string _x in
-          let o = o#loc (fun o -> o#string) _x_i1 in
-          let o = o#private_flag _x_i2 in
-          let o = o#class_field_kind _x_i3 in let o = o#bool _x_i4 in o
-      | Tcf_constr (_x, _x_i1) ->
-          let o = o#core_type _x in let o = o#core_type _x_i1 in o
-      | Tcf_init _x -> let o = o#expression _x in o
-    method class_field : class_field -> 'self_type =
-      fun { cf_desc = _x; cf_loc = _x_i1 } ->
-        let o = o#class_field_desc _x in let o = o#unknown _x_i1 in o
-    method class_expr_desc : class_expr_desc -> 'self_type =
-      function
-      | Tcl_ident (_x, _x_i1, _x_i2) ->
-          let o = o#unknown _x in
-          let o = o#loc (fun o -> o#unknown) _x_i1 in
-          let o = o#list (fun o -> o#core_type) _x_i2 in o
-      | Tcl_structure _x -> let o = o#class_structure _x in o
-      | Tcl_fun (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-          let o = o#label _x in
-          let o = o#pattern _x_i1 in
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#expression _x_i2 in o)
-              _x_i2 in
-          let o = o#class_expr _x_i3 in let o = o#partial _x_i4 in o
-      | Tcl_apply (_x, _x_i1) ->
-          let o = o#class_expr _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#label _x in
-                 let o = o#option (fun o -> o#expression) _x_i1 in
-                 let o = o#optional _x_i2 in o)
-              _x_i1
-          in o
-      | Tcl_let (_x, _x_i1, _x_i2, _x_i3) ->
-          let o = o#rec_flag _x in
-          let o =
-            o#list
-              (fun o (_x, _x_i1) ->
-                 let o = o#pattern _x in let o = o#expression _x_i1 in o)
-              _x_i1 in
-          let o =
-            o#list
-              (fun o (_x, _x_i1, _x_i2) ->
-                 let o = o#unknown _x in
-                 let o = o#loc (fun o -> o#string) _x_i1 in
-                 let o = o#expression _x_i2 in o)
-              _x_i2 in
-          let o = o#class_expr _x_i3 in o
-      | Tcl_constraint (_x, _x_i1, _x_i2, _x_i3, _x_i4) ->
-          let o = o#class_expr _x in
-          let o = o#option (fun o -> o#class_type) _x_i1 in
-          let o = o#list (fun o -> o#string) _x_i2 in
-          let o = o#list (fun o -> o#string) _x_i3 in
-          let o = o#unknown _x_i4 in o
-    method class_expr : class_expr -> 'self_type =
-      fun { cl_desc = _x; cl_loc = _x_i1; cl_type = _x_i2; cl_env = _x_i3 }
-        ->
-        let o = o#class_expr_desc _x in
-        let o = o#unknown _x_i1 in
-        let o = o#unknown _x_i2 in let o = o#unknown _x_i3 in o
-    method class_description : class_description -> 'self_type =
-      o#class_infos (fun o -> o#class_type)
-    method class_declaration : class_declaration -> 'self_type =
-      o#class_infos (fun o -> o#class_expr)
-    method unknown : 'a. 'a -> 'self_type = fun _ -> o
+      'a. ('self -> 'a -> 'self) -> 'a class_infos -> 'self =
+      fun __f_a __value ->
+        let self =
+          (fun (__x1, __x2) -> let self = self#list (fun self _ -> self) __x1 in self)
+            __value.ci_params in
+        let self = __f_a self __value.ci_expr in
+        let self =
+          self#list (fun self (__x1, __x2) -> self) __value.ci_variance
+        in self
   end
-  
-

ttfold.mli

-(***********************************************************************)
-(*                                                                     *)
-(*                            OCamlSpotter                             *)
-(*                                                                     *)
-(*                             Jun FURUSE                              *)
-(*                                                                     *)
-(*   Copyright 2008-2012 Jun Furuse. All rights reserved.              *)
-(*   This file is distributed under the terms of the GNU Library       *)
-(*   General Public License, with the special exception on linking     *)
-(*   described in file LICENSE.                                        *)
-(*                                                                     *)
-(***********************************************************************)
-
-open Typedtree
-
-class fold : object ('self)
-  method class_declaration      : class_declaration -> 'self
-  method class_description      : class_description -> 'self
-  method class_expr             : class_expr -> 'self
-  method class_expr_desc        : class_expr_desc -> 'self
-  method class_field            : class_field -> 'self
-  method class_field_desc       : class_field_desc -> 'self
-  method class_field_kind       : class_field_kind -> 'self
-  method class_infos            : ('self -> 'a -> 'self) -> 'a class_infos -> 'self
-  method class_signature        : class_signature -> 'self
-  method class_structure        : class_structure -> 'self
-  method class_type             : class_type -> 'self
-  method class_type_declaration : class_type_declaration -> 'self
-  method class_type_desc        : class_type_desc -> 'self
-  method class_type_field       : class_type_field -> 'self
-  method class_type_field_desc  : class_type_field_desc -> 'self
-  method core_field_desc        : core_field_desc -> 'self
-  method core_field_type        : core_field_type -> 'self
-  method core_type              : core_type -> 'self
-  method core_type_desc         : core_type_desc -> 'self
-  method exception_declaration  : exception_declaration -> 'self
-  method exp_extra              : exp_extra -> 'self
-  method expression             : expression -> 'self
-  method expression_desc        : expression_desc -> 'self
-  method meth                   : meth -> 'self
-  method modtype_declaration    : modtype_declaration -> 'self
-  method module_coercion        : module_coercion -> 'self
-  method module_expr            : module_expr -> 'self
-  method module_expr_desc       : module_expr_desc -> 'self
-  method module_type            : module_type -> 'self
-  method module_type_constraint : module_type_constraint -> 'self
-  method module_type_desc       : module_type_desc -> 'self
-  method mutable_flag           : Asttypes.mutable_flag -> 'self
-  method package_type           : package_type -> 'self
-  method partial                : partial -> 'self
-  method pat_extra              : pat_extra -> 'self
-  method pattern                : pattern -> 'self
-  method pattern_desc           : pattern_desc -> 'self
-  method row_field              : row_field -> 'self
-  method signature              : signature -> 'self
-  method signature_item         : signature_item -> 'self
-  method signature_item_desc    : signature_item_desc -> 'self
-  method structure              : structure -> 'self
-  method structure_item         : structure_item -> 'self
-  method structure_item_desc    : structure_item_desc -> 'self
-  method type_declaration       : type_declaration -> 'self
-  method type_kind              : type_kind -> 'self
-  method value_description      : value_description -> 'self
-  method with_constraint        : with_constraint -> 'self
-
-  method unknown : 'a -> 'self
-
-  method direction_flag          : Asttypes.direction_flag -> 'self
-  method string                  : string -> 'self
-  method private_flag            : Asttypes.private_flag -> 'self
-  method option                  : ('self -> 'a -> 'self) -> 'a option -> 'self
-  method optional                : optional -> 'self
-  method override_flag           : Asttypes.override_flag -> 'self
-  method int                     : int -> 'self
-  method loc                     : ('self -> 'a -> 'self) -> 'a Asttypes.loc -> 'self
-  method label                   : Asttypes.label -> 'self
-  method list                    : ('self -> 'a -> 'self) -> 'a list -> 'self
-  method label_description       : Types.label_description -> 'self
-  method rec_flag                : Asttypes.rec_flag -> 'self
-  method ref                     : ('self -> 'a -> 'self) -> 'a ref -> 'self
-  method row_desc                : Types.row_desc -> 'self
-  method bool                    : bool -> 'self
-  method closed_flag             : Asttypes.closed_flag -> 'self
-  method constant                : Asttypes.constant -> 'self
-  method constructor_description : Types.constructor_description -> 'self
-  method type_expr               : Types.type_expr -> 'self
-  method virtual_flag            : Asttypes.virtual_flag -> 'self
-end
             begin match (repr ty1).desc with
             | Tconstr(path, [ty], abbrev) when Path.same path Predef.path_option ->
                 (* we do not copy abbrev but it is ok *)
-      	  Tarrow (l, 
-	  		  { ty1 with desc = Tconstr(path, [f ty], abbrev) },
-	  		  f ty2,
-	  		  comm)
+      	        Tarrow (l, 
+	  		{ ty1 with desc = Tconstr(path, [f ty], abbrev) },
+	  		f ty2,
+	  		comm)
             | _ -> (* not option ? *) default t
             end
 	  | Tvariant row_desc -> (* we cannot use copy_type_desc *)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.