Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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, 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix
Literate Programming tool Interscript
Bug reports:  FAQ:
To unsubscribe, mail  Archives: