diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2003-04-28 10:00:54 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2003-04-28 10:00:54 +0000 |
commit | 47e2d11c7607b07dde2fb5906bf7681a65e63a67 (patch) | |
tree | 75dd03c45175918ab2565bc77bf2b0aedafe876a | |
parent | 961dc4bda4ccf0f440e532eed4fbc16c27db5d23 (diff) |
Virtual becomes private.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5519 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | Changes | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -1,13 +1,17 @@ Language features: -- Introduction of a new kind of data types: the virtual data types. - Virtual types are intended to modelize non free algebraic types that +- Introduction of a new kind of data types: the concrete data types + with private constructors or labels, private types for short. + Private types are intended to modelize non free algebraic types that must verify semantic relations that were not enforceable in previously available Caml data types. - Values from virtual types can be freely used in pattern matching but - the creation of values is reserved to special purpose functions - provided in the type definition module. + Values from private types can be freely used in pattern matching but + the creation of values for private types is reserved to special + purpose functions provided in the module implementation where the + private type definition occurs. That way, the construction functions can enforce any required invariant for - the datatype. + the datatype. Private types are semi-concrete (since they allow + pattern matching as concrete types do) and semi-abstract (since they + forbid direct construction of values as abstract types do). - Added integer literals of types int32, nativeint, int64 (written with an 'l', 'n' or 'L' suffix respectively). |