Commits

camlspotter  committed 7e8d1bc Draft

new type_conv port

  • Participants
  • Parent commits 7db9abb

Comments (0)

Files changed (1)

File lib/pa_json_tc.ml

 
 open Pa_type_conv
 let _ =
-  add_generator_with_arg "json" json_parms
-   (fun tds args -> 
-     let _loc = Loc.ghost in
-     let ptd = match args with
-     | None -> process_tds [] tds
-     | Some x -> 
-         let skips = List.fold_left (fun a -> function | `Skip x -> a @ x) [] x in
-         process_tds skips tds in
-     <:str_item< $expand_typedefs _loc ptd$ >>)
+  add_generator_with_arg 
+    ~is_exn:false 
+    "json" 
+    json_parms
+    (fun args _bool (tds : Ast.ctyp) -> 
+      let _loc = Loc.ghost in
+      let ptd = match args with
+        | None -> process_tds [] tds
+        | Some x -> 
+            let (skips : string list) = List.fold_left (fun a -> function | `Skip x -> a @ x) [] x in
+            process_tds skips tds in
+      <:str_item< $expand_typedefs _loc ptd$ >>)