caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* empty type
@ 2007-02-19 13:47 Fernando Alegre
  2007-02-19 14:14 ` [Caml-list] " skaller
  2007-02-19 22:36 ` Richard Jones
  0 siblings, 2 replies; 7+ messages in thread
From: Fernando Alegre @ 2007-02-19 13:47 UTC (permalink / raw)
  To: caml-list


Hi,

I think this is a bug, but I'm not sure. I mistakenly defined type e using
Haskell notation, and it was accepted. However, it shadowed the unit type.
Can someone confirm whether this should be acceptable or not?

Thanks.

        Objective Caml version 3.09.2

# type e = ();;
type e = ()
# type t = A of e | B of unit;;
type t = A of e | B of unit
# A();;
- : t = A ()
# B();;
This expression has type e but is here used with type unit


Fernando


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

end of thread, other threads:[~2007-02-20  9:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 13:47 empty type Fernando Alegre
2007-02-19 14:14 ` [Caml-list] " skaller
2007-02-19 14:23   ` RE : " Mathias Kende
2007-02-19 16:03     ` Andrej Bauer
2007-02-19 20:51       ` Fernando Alegre
2007-02-20  9:05       ` Bruno De Fraine
2007-02-19 22:36 ` Richard Jones

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