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

Diff of /typing/typer.ml

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

revision 50 by abate, Tue Jul 10 17:00:52 2007 UTC revision 51 by abate, Tue Jul 10 17:01:10 2007 UTC
# Line 612  Line 612 
612    
613  and type_op loc op args =  and type_op loc op args =
614    match (op,args) with    match (op,args) with
615      | ("+", [loc1,t1; loc2,t2]) ->      | "+", [loc1,t1; loc2,t2] ->
616          type_int_binop Intervals.add loc1 t1 loc2 t2          type_int_binop Intervals.add loc1 t1 loc2 t2
617      | ("*", [loc1,t1; loc2,t2]) ->      | "-", [loc1,t1; loc2,t2] ->
618            type_int_binop Intervals.sub loc1 t1 loc2 t2
619        | ("*" | "/"), [loc1,t1; loc2,t2] ->
620          type_int_binop (fun i1 i2 -> Intervals.any) loc1 t1 loc2 t2          type_int_binop (fun i1 i2 -> Intervals.any) loc1 t1 loc2 t2
621      | ("@", [loc1,t1; loc2,t2]) ->      | "@", [loc1,t1; loc2,t2] ->
622          check loc1 t1 Sequence.any          check loc1 t1 Sequence.any
623            "The first argument of @ must be a sequence";            "The first argument of @ must be a sequence";
624          Sequence.concat t1 t2          Sequence.concat t1 t2
625      | ("flatten", [loc1,t1]) ->      | "flatten", [loc1,t1] ->
626          check loc1 t1 Sequence.seqseq          check loc1 t1 Sequence.seqseq
627            "The argument of flatten must be a sequence of sequences";            "The argument of flatten must be a sequence of sequences";
628          Sequence.flatten t1          Sequence.flatten t1

Legend:
Removed from v.50  
changed lines
  Added in v.51

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