Version française
Home     About     Download     Resources     Contact us    
Browse thread
empty type
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Fernando Alegre <fernando@c...>
Subject: empty type

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