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
[Caml-list] Polymorphism and the "for" loop
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-21 (19:25)
From: Jon Harrop <jon@j...>
Subject: Re: [Caml-list] Polymorphism and the "for" loop
On Thursday 21 October 2004 20:12, Ville-Pertti Keinonen wrote:
> Consider the fact that it's a warning as opposed to an error.

I see. Does this stem from historical reasons or is there a logical reason why 
this should be a warning rather than an error?

> ...
> If your second example produced a type of unit -> unit for g, I think 
> your first example should fail with an error (rather than be accepted 
> with a warning).

Yes, whereas the current approach can "fail" silently:

# f (fun () -> 1);;
- : unit = ()


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: