[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFH #453191: ftbfs because of type mismatch



On Wed, Nov 28, 2007 at 11:04:21AM +0200, George Danchev wrote:
> 	it seems like ocaml in sid is much more stricter and yesterday
> I got ftbfs #453191 filed against ara. I guess the fix should be
> something minor to change, but I can't realize how to do it, so
> please any help would be appreciated. Thanks.

The problem is that the append_page and prepend_page methods for
notebook objects in GPack now return an int (page number, I assume),
instead of unit.

A patch is attached.

-- 
Eric Cooper             e c c @ c m u . e d u
--- ara-1.0.20/gui/gui.ml	2007-09-08 15:58:54.000000000 +0000
+++ ara-1.0.20-new/gui/gui.ml	2007-11-30 17:32:26.000000000 +0000
@@ -29,6 +29,9 @@
     (Sys.argv.(0) ^ " [options]")
 ;;
 (* ***)
+
+let ign f x = ignore (f x)
+
 (*** Make *)
 module Make(Dpkg : Dpkg.DB) =
   struct
@@ -849,11 +852,11 @@
       let nb1 = GPack.notebook ~border_width:5 ~packing:f1#add () in
       let vb11 = GPack.vbox
         ~spacing:5
-        ~packing:(nb1#append_page ~tab_label:((GMisc.label ~text:"Edit" ())#coerce)) ()
+        ~packing:(ign (nb1#append_page ~tab_label:((GMisc.label ~text:"Edit" ())#coerce))) ()
       in
       let vb12 = GPack.vbox
         ~spacing:5 ~border_width:5 
-        ~packing:(nb1#append_page ~tab_label:((GMisc.label ~text:"Show" ())#coerce)) ()
+        ~packing:(ign (nb1#append_page ~tab_label:((GMisc.label ~text:"Show" ())#coerce))) ()
       in
       let sw121 = GBin.scrolled_window
         ~hpolicy:`AUTOMATIC
@@ -1742,24 +1745,24 @@
       let notebook1 = GPack.notebook ~packing () in (* Advanced, Simple *)
 
       let query_book = new query_book
-        ~packing:(notebook1#append_page ~tab_label:((GMisc.label ~text:"Variables" ())#coerce)) ()
+        ~packing:(ign (notebook1#append_page ~tab_label:((GMisc.label ~text:"Variables" ())#coerce))) ()
       in
 
       let requests = new requests
         ~results
         ~query_book
-        ~packing:(notebook1#prepend_page ~tab_label:((GMisc.label ~text:"Advanced" ())#coerce)) ()
+        ~packing:(ign (notebook1#prepend_page ~tab_label:((GMisc.label ~text:"Advanced" ())#coerce))) ()
       in
 
       let syntax_help = new syntax_help
-        ~packing:(notebook1#append_page
-          ~tab_label:((GMisc.label ~text:"Syntax help" ())#coerce)) ()
+        ~packing:(ign (notebook1#append_page
+          ~tab_label:((GMisc.label ~text:"Syntax help" ())#coerce))) ()
       in
 
       let simple_requests = new simple_requests
         ~results
         ~requests
-        ~packing:(notebook1#append_page ~tab_label:((GMisc.label ~text:"Simple" ())#coerce)) ()
+        ~packing:(ign (notebook1#append_page ~tab_label:((GMisc.label ~text:"Simple" ())#coerce))) ()
       in
 
       object(self)

Reply to: