caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Match error with abstract types in modules
@ 2015-02-24 17:25 David Allsopp
  2015-02-24 18:02 ` Leo White
  0 siblings, 1 reply; 10+ messages in thread
From: David Allsopp @ 2015-02-24 17:25 UTC (permalink / raw)
  To: OCaml List

Please could someone remind me what it is about types in modules which means
that

  module Foo = struct
    type 'a foo
  end

  type _ t = A : int Foo.foo t
           | B : float Foo.foo t

  let foo A = ()

is non-exhaustive pattern matching, but:

  type 'a bar

  type _ u = C : int bar u
           | D : float bar u

  let bar C = ()

is exhaustive? Or is it actually a bug (given that foo B is a type error)?


David


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

end of thread, other threads:[~2015-02-25  9:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-24 17:25 [Caml-list] Match error with abstract types in modules David Allsopp
2015-02-24 18:02 ` Leo White
2015-02-24 18:26   ` David Allsopp
2015-02-24 19:11     ` Leo White
2015-02-25  8:41       ` David Allsopp
2015-02-24 19:52     ` Jeremy Yallop
2015-02-24 20:03       ` Ben Millwood
2015-02-24 21:11         ` Leo White
2015-02-25  8:41           ` David Allsopp
2015-02-25  9:48             ` Gabriel Scherer

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