Browse thread
Why doesn't ocamlopt detect a missing ; after failwith statement?
[
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: | 2004-11-26 (00:11) |
From: | skaller <skaller@u...> |
Subject: | Re: [Caml-list] Why doesn't ocamlopt detect a missing ; after failwith statement? |
On Fri, 2004-11-26 at 08:14, Nicolas Cannasse wrote: > > All well and good, but I don't understand why it doesn't warn me about > > the missing ';' in the first case. > > val failwith : string -> 'a > > so failwith "error" prerr_endline "OK"; > > is a valid call since 'a unify with (string -> unit) -> string -> unit .. a problem which could not occur were there a void type which couldn't unify with 'a, and prerr_endline had type string-> void. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net