diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-02-12 23:19:35 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-02-12 23:19:35 +0000 |
commit | 1e84be9cd56b5466befa3f7b1957f7421b32f417 (patch) | |
tree | a36e55c8c311fe6b68ad7e36668332cd506ba567 | |
parent | 34068509c888623640b140b7aaa8299d285c21d9 (diff) |
label related fixes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2809 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/labltk/browser/editor.ml | 19 | ||||
-rw-r--r-- | otherlibs/threads/threadUnix.ml | 4 | ||||
-rw-r--r-- | stdlib/Makefile | 31 | ||||
-rw-r--r-- | typing/typecore.ml | 1 | ||||
-rw-r--r-- | utils/config.mlp | 2 |
5 files changed, 15 insertions, 42 deletions
diff --git a/otherlibs/labltk/browser/editor.ml b/otherlibs/labltk/browser/editor.ml index e7ee627ac..ade7712b0 100644 --- a/otherlibs/labltk/browser/editor.ml +++ b/otherlibs/labltk/browser/editor.ml @@ -473,14 +473,16 @@ class editor :top :menus = object (self) method close_file () = self#close_window (List.hd windows) method quit () = - try List.iter windows - fun:(fun txt -> + try + List.iter windows fun: + begin fun txt -> if Textvariable.get txt.modified = "modified" then match Jg_message.ask master:top title:"Quit" ("`" ^ Filename.basename txt.name ^ "' modified. Save it?") with `yes -> self#save_text txt | `no -> () - | `cancel -> raise Exit); + | `cancel -> raise Exit + end; bind top events:[`Destroy]; destroy top; break () with Exit -> break () @@ -511,18 +513,19 @@ class editor :top :menus = object (self) action:(fun _ -> act (); break ()) end; - bind top events:[`Destroy] breakable:true fields:[`Widget] - action:(fun ev -> + bind top events:[`Destroy] breakable:true fields:[`Widget] action: + begin fun ev -> if Widget.name ev.ev_Widget = Widget.name top - then self#quit ()); + then self#quit () + end; (* File menu *) file_menu#add_command "Open File..." command:self#open_file; file_menu#add_command "Reopen" command:(fun () -> self#load_text [(List.hd windows).name]); file_menu#add_command "Save File" command:self#save_file accelerator:"M-s"; - file_menu#add_command "Save As..." underline:5 - command:begin fun () -> + file_menu#add_command "Save As..." underline:5 command: + begin fun () -> let txt = List.hd windows in Fileselect.f title:"Save as File" action:(fun name -> self#save_text txt :name) diff --git a/otherlibs/threads/threadUnix.ml b/otherlibs/threads/threadUnix.ml index 823d0c5a2..87556cfb2 100644 --- a/otherlibs/threads/threadUnix.ml +++ b/otherlibs/threads/threadUnix.ml @@ -92,7 +92,7 @@ let pipe() = let open_process_in cmd = let ic = Unix.open_process_in cmd in Unix.set_nonblock(Unix.descr_of_in_channel ic); - oc + ic let open_process_out cmd = let oc = Unix.open_process_out cmd in @@ -109,7 +109,7 @@ let open_process_full cmd env = let (ic, oc, ec as channels) = Unix.open_process_full cmd env in Unix.set_nonblock(Unix.descr_of_in_channel ic); Unix.set_nonblock(Unix.descr_of_out_channel oc); - Unix.set_nonblock(Unix.descr_of_out_channel ec); + Unix.set_nonblock(Unix.descr_of_in_channel ec); channels (*** Time *) diff --git a/stdlib/Makefile b/stdlib/Makefile index 2d92b8995..bff51bfa4 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -102,37 +102,6 @@ pervasives.p.cmx: pervasives.ml oo.cmi: oo.mli $(CAMLC) $(COMPFLAGS) -nopervasives -c oo.mli -# stdlabel.cmo and morelabel.cmo use -labelize -stdlabel.cmo: stdlabel.ml - $(CAMLC) $(COMPFLAGS) -labelize -c stdlabel.ml - -stdlabel.cmx: stdlabel.ml - $(CAMLOPT) $(OPTCOMPFLAGS) -labelize -c stdlabel.ml - -stdlabel.p.cmx: stdlabel.ml - @if test -f stdlabel.cmx; then mv stdlabel.cmx stdlabel.n.cmx; else :; fi - @if test -f stdlabel.o; then mv stdlabel.o stdlabel.n.o; else :; fi - $(CAMLOPT) $(OPTCOMPFLAGS) -p -labelize -c stdlabel.ml - mv stdlabel.cmx stdlabel.p.cmx - mv stdlabel.o stdlabel.p.o - @if test -f stdlabel.n.cmx; then mv stdlabel.n.cmx stdlabel.cmx; else :; fi - @if test -f stdlabel.n.o; then mv stdlabel.n.o stdlabel.o; else :; fi - -morelabel.cmo: morelabel.ml - $(CAMLC) $(COMPFLAGS) -labelize -c morelabel.ml - -morelabel.cmx: morelabel.ml - $(CAMLOPT) $(OPTCOMPFLAGS) -labelize -c morelabel.ml - -morelabel.p.cmx: morelabel.ml - @if test -f morelabel.cmx; then mv morelabel.cmx morelabel.n.cmx; else :; fi - @if test -f morelabel.o; then mv morelabel.o morelabel.n.o; else :; fi - $(CAMLOPT) $(OPTCOMPFLAGS) -p -labelize -c morelabel.ml - mv morelabel.cmx morelabel.p.cmx - mv morelabel.o morelabel.p.o - @if test -f morelabel.n.cmx; then mv morelabel.n.cmx morelabel.cmx; else :; fi - @if test -f morelabel.n.o; then mv morelabel.n.o morelabel.o; else :; fi - .SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx .mli.cmi: diff --git a/typing/typecore.ml b/typing/typecore.ml index 65bb402b6..8929821bb 100644 --- a/typing/typecore.ml +++ b/typing/typecore.ml @@ -903,6 +903,7 @@ and type_application env funct sargs = raise(Error(funct.exp_loc, Apply_non_function funct.exp_type)) in let arg1 = type_expect env sarg1 ty1 in + if is_optional l1 then unify_exp env arg1 (type_option(newvar())); type_unknown_args (Some arg1 :: args) omitted ty2 sargl in let rec type_args args omitted ty_fun ty_old sargs more_sargs = diff --git a/utils/config.mlp b/utils/config.mlp index 14639ccf4..c7c06784a 100644 --- a/utils/config.mlp +++ b/utils/config.mlp @@ -12,7 +12,7 @@ (* $Id$ *) -let version = "2.99+3 (2000/02/01)" +let version = "2.99+4 (2000/02/13)" let standard_library = try |