/[svn]/typing/typer.ml
ViewVC logotype

Diff of /typing/typer.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 123 by abate, Tue Jul 10 17:08:03 2007 UTC revision 124 by abate, Tue Jul 10 17:08:19 2007 UTC
# Line 521  Line 521 
521        if Types.Record.is_empty rconstr then        if Types.Record.is_empty rconstr then
522          raise_loc loc (ShouldHave (constr,"but it is a record."));          raise_loc loc (ShouldHave (constr,"but it is a record."));
523    
524    (* Completely buggy !  Need to check at the end that all required labels
525       are present ...A better to do it without precise = true ? *)
526          let precise = true in
527    
528        let (rconstr,res) =        let (rconstr,res) =
529          List.fold_left          List.fold_left
530            (fun (rconstr,res) (l,e) ->            (fun (rconstr,res) (l,e) ->
# Line 543  Line 547 
547               (rconstr,res)               (rconstr,res)
548            ) (rconstr, if precise then Types.Record.any else constr) r            ) (rconstr, if precise then Types.Record.any else constr) r
549        in        in
550    (*      check loc res constr ""; *)
551        res        res
552    
553    | Map (e,b) ->    | Map (e,b) ->
# Line 779  Line 784 
784          Types.empty          Types.empty
785      | "print_xml", [loc1,t1] ->      | "print_xml", [loc1,t1] ->
786          Sequence.string          Sequence.string
787        | "print", [loc1,t1] ->
788            check loc1 t1 Sequence.string
789              "The argument of print";
790            t1
791      | "int_of", [loc1,t1] ->      | "int_of", [loc1,t1] ->
792          check loc1 t1 Sequence.string          check loc1 t1 Sequence.string
793            "The argument of int_of must a string";            "The argument of int_of must a string";

Legend:
Removed from v.123  
changed lines
  Added in v.124

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5