caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] function overloading
@ 2003-11-05  8:57 Dustin Sallings
  2003-11-05 10:13 ` Issac Trotts
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dustin Sallings @ 2003-11-05  8:57 UTC (permalink / raw)
  To: Caml Mailing List


	I swear I found an example demonstrating how to do pattern matching 
based on the type of an argument, but every pattern matching example I 
can find now seems to be focused on value and not type.

	I'm trying to do something like this:

let print_poly x = match x with
     | (x: bool) -> print_bool x
     | (x: int) ->  print_int x
;;

	Can someone tell me what I'm doing wrong (or perhaps tell me why I 
shouldn't be doing this at all)?

-- 
Dustin Sallings

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-07  8:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-05  8:57 [Caml-list] function overloading Dustin Sallings
2003-11-05 10:13 ` Issac Trotts
2003-11-05 17:51   ` Dustin Sallings
2003-11-05 10:39 ` Julien Demouth
2003-11-07  7:05 ` skaller

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).