Commits

camlspotter committed 9caf4fe

option^n are down to option^1

  • Participants
  • Parent commits cb28840

Comments (0)

Files changed (1)

 
   module Constr = struct
     let tuple ts       = Array ts
-    let variant tag = function
+    let variant _tyname tag = function
       | [] -> String tag
       | ts -> Object [tag, Array ts]
-    let record tag_ts  = Object tag_ts
+    let record _tyname tag_ts  = Object tag_ts
     let poly_variant = variant
     let object_ = record
   end
       | Array ts -> ts
       | _ -> errorf "Array expected for tuple"
   
-    let variant = function 
+    let variant _tyname = function 
       | String tag -> tag, [] 
       | Object [tag, Array ts] -> tag, ts
       | _ -> errorf "Object expected for variant"
   
-    let record = function
+    let record _tyname = function
       | Object alist -> alist
       | _ -> errorf "Object expected for record"
   
 let json_of_bool b      = Bool b
 let json_of_lazy_t f v  = f (Lazy.force v)
 let json_of_unit ()     = Null
+(* jfuruse: This 'a option^n maps to 'a option *)
 let json_of_option f    = function
   | None -> Null
   | Some v -> f v
 let array_of_json f = 
   Helper.array_of (function Array xs -> Some xs | _ -> None) f
 
+(* jfuruse: 'a option^n mapped to 'a option *)
 let option_of_json f = Helper.option_of 
   (function Null -> Some None | v -> Some (Some v))
   f