caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Type hidding
@ 2002-01-16 20:09 Warp
  2002-01-16 23:32 ` Ceri Storey
  2002-01-17 10:57 ` Daniel de Rauglaudre
  0 siblings, 2 replies; 5+ messages in thread
From: Warp @ 2002-01-16 20:09 UTC (permalink / raw)
  To: OCaml

Hello !
I'm having theses functions :

external set_window_data : wnd:hwnd -> 'a -> unit = "set_window_data"
external get_window_data : wnd:hwnd -> 'a = "get_window_data"

I know that's very type-unsafe and all, but i really need the user to be
able to put any kind of data into it. If you got another idea, please let me
know.

BTW, then with my handle i'm doing that :
    (set_window_data wnd 0);
    (print_int (get_window_data wnd));

but it raises (about the call the get_window_data ) :
    This expression has type wnd:hwnd -> 'a but is here used with type int

I've tried to "force" the return value to int but it doesn't seems to work.
Any help welcomed.

Warp

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <000901c19ecf$b8c93ee0$0b01a8c0@mit.edu>]

end of thread, other threads:[~2002-01-18  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-16 20:09 [Caml-list] Type hidding Warp
2002-01-16 23:32 ` Ceri Storey
2002-01-17 10:57 ` Daniel de Rauglaudre
     [not found] <000901c19ecf$b8c93ee0$0b01a8c0@mit.edu>
2002-01-17 17:44 ` Warp
2002-01-18  6:40   ` Jacques Garrigue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).