Browse thread
-
Johann Spies
- Francois Pottier
- Vitaly Lugovsky
-
md5i@c...
-
John Max Skaller
-
Hendrik Tews
- John Max Skaller
-
Hendrik Tews
-
John Max Skaller
[
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 Max Skaller <skaller@m...> |
| Subject: | Re: empty type (was [Caml-list] Please help a newbie) |
Hendrik Tews wrote: > It is my contention that the type of procedures is wrong > in ocaml precisely because they return unit, when they > _should_ be returning void (that is, nothing). > > So what typing rules do you use for the empty type? Usually a > type theory is inconsistent as soon as one has an inhabitant of > the empty type. Felix has statements and expressions. The typing rule is: f:T -> void, a:T |- f a: void Note that 'f a' cannot occur inside an expression, indeed, it isn't an expression but a statement. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr