File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ and ident_failure = ident_create_predef_exn "Failure"
112112and  ident_ok =  ident_create_predef_exn " Ok" 
113113and  ident_error =  ident_create_predef_exn " Error" 
114114
115+ and  ident_anyOtherField =  ident_create " anyOtherField" 
116+ 
115117and  ident_js_error =  ident_create_predef_exn " JsError" 
116118and  ident_not_found =  ident_create_predef_exn " Not_found" 
117119
@@ -221,7 +223,16 @@ let common_initial_env add_type add_extension empty_env =
221223    {decl_abstr with 
222224      type_params =  [tvar];
223225      type_arity =  1 ;
224-       type_variance =  [Variance. full]}
226+       type_variance =  [Variance. full];
227+       type_kind =  
228+         Type_record  ([
229+           {ld_id =  ident_anyOtherField;
230+           ld_attributes =  [(Location. mknoloc " res.optional" Parsetree. PStr  [] )];
231+           ld_loc =  Location. none;
232+           ld_mutable =  Immutable ; (*  TODO(dict-pattern-matching) Should probably be mutable? *) 
233+           ld_type =  newgenty (Tconstr  (path_option, [tvar], ref  Mnil ));
234+           }], Record_optional_labels  [Ident. name ident_anyOtherField]);
235+     }
225236  and  decl_uncurried = 
226237    let  tvar1, tvar2 =  newgenvar() , newgenvar()  in 
227238    {decl_abstr with 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments