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
Warning wished
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-28 (14:27)
From: Julien SIGNOLES <julien.signoles@c...>
Subject: Re: [Caml-list] Warning wished
Hello Dmitri,

>     no warning should be issued in this case since you have polymorphic 
> function:
> applying g to () you will definitely have f x of type unit :)

Applying g to 1 you will definitely have f x of type int and you have to
take care of the returned integer. Unfortunatly caml emits no warning in
this case (even if I understand why) :(.