diff options
Diffstat (limited to 'otherlibs/labltk/compiler')
-rw-r--r-- | otherlibs/labltk/compiler/compile.ml | 8 | ||||
-rw-r--r-- | otherlibs/labltk/compiler/intf.ml | 2 | ||||
-rw-r--r-- | otherlibs/labltk/compiler/maincompile.ml | 2 | ||||
-rw-r--r-- | otherlibs/labltk/compiler/tables.ml | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/otherlibs/labltk/compiler/compile.ml b/otherlibs/labltk/compiler/compile.ml index a7c12ab12..1a743b9f5 100644 --- a/otherlibs/labltk/compiler/compile.ml +++ b/otherlibs/labltk/compiler/compile.ml @@ -47,7 +47,7 @@ let small_ident s = let idents = ["to"; "raise"; "in"; "class"; "new"] in let s = small s in - if List.mem key:s idents then (String.make len:1 s.[0])^s + if List.mem item:s idents then (String.make len:1 s.[0])^s else s let gettklabel fc = @@ -59,7 +59,7 @@ let gettklabel fc = if s = "" then small fc.ml_name else small s | _ -> raise (Failure "gettklabel") -let count key:x l = +let count item:x l = let count = ref 0 in List.iter fun:(fun y -> if x = y then incr count) l; !count @@ -103,7 +103,7 @@ let ppMLtype ?(:any=false) ?(:return=false) ?(:def=false) ?(:counter=ref 0) = let l = List.map fcl fun: begin fun fc -> "?" ^ begin let p = gettklabel fc in - if count key:p tklabels > 1 then small fc.ml_name else p + if count item:p tklabels > 1 then small fc.ml_name else p end ^ ":" ^ let l = types_of_template fc.template in @@ -724,7 +724,7 @@ let write_catch_optionals :w clas def:typdef = if co <> "" then fatal_error "optionals in optionals"; *) let p = gettklabel fc in - (if count key:p tklabels > 1 then small fc.ml_name else p), + (if count item:p tklabels > 1 then small fc.ml_name else p), small_ident fc.ml_name (* used as labels *), small fc.ml_name end in diff --git a/otherlibs/labltk/compiler/intf.ml b/otherlibs/labltk/compiler/intf.ml index a46a6b250..42225ed5b 100644 --- a/otherlibs/labltk/compiler/intf.ml +++ b/otherlibs/labltk/compiler/intf.ml @@ -30,7 +30,7 @@ let write_create_p :w wname = let l = List.map classdefs fun: begin fun fc -> begin let p = gettklabel fc in - if count key:p tklabels > 1 then small fc.ml_name else p + if count item:p tklabels > 1 then small fc.ml_name else p end, fc.template end in w (String.concat sep:" ->\n" diff --git a/otherlibs/labltk/compiler/maincompile.ml b/otherlibs/labltk/compiler/maincompile.ml index ff646226b..503416482 100644 --- a/otherlibs/labltk/compiler/maincompile.ml +++ b/otherlibs/labltk/compiler/maincompile.ml @@ -121,7 +121,7 @@ verbose_string "type "; verbose_string "C2T "; write_CAMLtoTK w:(output_string to:oc') typname def:typdef; verbose_string "T2C "; - if List.mem key:typname !types_returned then + if List.mem item:typname !types_returned then write_TKtoCAML w:(output_string to:oc') typname def:typdef; verbose_string "CO "; write_catch_optionals w:(output_string to:oc') typname def:typdef; diff --git a/otherlibs/labltk/compiler/tables.ml b/otherlibs/labltk/compiler/tables.ml index eea78ab59..30a7b954b 100644 --- a/otherlibs/labltk/compiler/tables.ml +++ b/otherlibs/labltk/compiler/tables.ml @@ -250,7 +250,7 @@ let rec has_callback = function (*** Returned types ***) let really_add ty = - if List.mem key:ty !types_returned then () + if List.mem item:ty !types_returned then () else types_returned := ty :: !types_returned let rec add_return_type = function |