caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* When is a function polymorphic?
@ 2005-03-30 22:31 Yaron Minsky
  2005-03-31  0:37 ` [Caml-list] " Jacques Garrigue
  0 siblings, 1 reply; 12+ messages in thread
From: Yaron Minsky @ 2005-03-30 22:31 UTC (permalink / raw)
  To: Caml Mailing List

I don't understand the following results.  It seems like these two
examples should have the same type.  In this example, there isn't much
of a difference between the two cases, but there are cases where this
idiom is quite convenient.  Any idea how to salvage it?

# function Some x -> Some () | None as x -> x;;
- : 'a option -> unit option = <fun>
# function Some x -> Some () | x -> x;;
- : unit option -> unit option = <fun>


Yaron


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

end of thread, other threads:[~2005-04-01 16:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-30 22:31 When is a function polymorphic? Yaron Minsky
2005-03-31  0:37 ` [Caml-list] " Jacques Garrigue
2005-03-31  0:51   ` Yaron Minsky
2005-03-31  1:15     ` Eric Cooper
2005-03-31  1:26     ` Martin Jambon
2005-03-31  2:42     ` Jacques Garrigue
2005-03-31  4:04       ` Yaron Minsky
2005-03-31  8:32         ` Jacques Garrigue
2005-03-31 12:04           ` Yaron Minsky
2005-03-31 12:48             ` Fermin Reig
2005-03-31 12:16           ` Jon Harrop
2005-04-01 16:26           ` Luc Maranget

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