Browse thread
Internals details for cmmgen.ml
-
John Prevost
-
Xavier Leroy
-
John Prevost
-
Jerome Vouillon
- John Prevost
-
Jerome Vouillon
-
John Prevost
-
Xavier Leroy
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | John Prevost <prevost@m...> |
| Subject: | Re: Internals details for cmmgen.ml |
Jerome Vouillon <Jerome.Vouillon@inria.fr> writes: > You could also probably make the permission check only once, when the > region is created, and use the type system to enforce safety. For > instance, the interface could look something like this: > > type 'a perms > type 'a t > > val read_only : <read:unit> perms > val write_only : <write:unit> perms > val read_write : <read:unit;write:unit> perms Oho! Nice trick. I'd thought of using the type system, but it hadn't occurred to me that I could use object types in such a nefarious way! Nice! John.