Version française
Home     About     Download     Resources     Contact us    
Browse thread
Private type syntax and error message
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Private type syntax and error message
> What do you expect it to do that might work? If it created
> an abstract type 
> the type would be useless, having no way to construct or
> destructure values 
> of that type...


I think the idea is that the type would be declared inside
a module that would provide constructor functions.  Moreover,
because private is not abstract, it would allow the outside
world to pattern-match on values of that type.  This is actually
a very useful feature.

Btw, the code works on 3.11 CVS!

Dario Teixeira