File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,9 @@ let emit_external_warnings : iterator =
8585            ( Nonrecursive ,
8686              [{ptype_kind =  Ptype_variant  ({pcd_res =  Some  _} :: _)}] ) ->
8787          Location. raise_errorf ~loc: str_item.pstr_loc
88-             " GADT has to be recursive types, please try `type rec'" 
88+             " GADTs in ReScript require recursive type syntax.\n \
89+              Please define your type using `type rec` instead of `type`.\n \ 
90+              Example: type rec t = ..."  
8991        |  _  -> super.structure_item self str_item);
9092    expr = 
9193      (fun  self  ({pexp_loc  = loc }  as  a ) ->
@@ -94,8 +96,7 @@ let emit_external_warnings : iterator =
9496        |  Pexp_variant  (s , None) when  Ext_string. is_valid_hash_number s -> (
9597          try  ignore (Ext_string. hash_number_as_i32_exn s : int32 )
9698          with  _  -> 
97-             Location. raise_errorf ~loc 
98-               " This number is too large to cause int overlow"  )
99+             Location. raise_errorf ~loc  " Integer literal does not fit in int32."  )
99100        |  _  -> super.expr self a);
100101    label_declaration = 
101102      (fun  self  lbl  ->
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments