caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Simple(?) subtyping problem...
@ 2006-10-24 20:45 Till Varoquaux
  2006-10-24 21:53 ` [Caml-list] " Jon Harrop
  2006-10-24 22:46 ` Jacques Garrigue
  0 siblings, 2 replies; 5+ messages in thread
From: Till Varoquaux @ 2006-10-24 20:45 UTC (permalink / raw)
  To: OCaml

I'm currently trying to split functions matching against given variant
type and I'm running across this pb:

let a= function
 | `A -> ()
 | `B -> ()

doesn't split into

let c=function
 | `B -> ()

let b =function
 | `A -> ()
 |  x -> c x

since it messes up the type rules. I really want to avoid having to
write down precise type informations (The point here is to have an
extensible system)...

I am sure this question has been asked loads of times (but I couldn't
find the right thread in the archives) and I apologize for asking it
yet again.

Till


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

end of thread, other threads:[~2006-10-25  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-24 20:45 Simple(?) subtyping problem Till Varoquaux
2006-10-24 21:53 ` [Caml-list] " Jon Harrop
2006-10-24 22:46 ` Jacques Garrigue
2006-10-25  6:03   ` Till Varoquaux
2006-10-25  7:16     ` 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).