caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Type inference question
@ 2005-04-26 11:15 Julien Verlaguet
  2005-04-26 12:00 ` [Caml-list] " Jean-Christophe Filliatre
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Verlaguet @ 2005-04-26 11:15 UTC (permalink / raw)
  To: caml-list

I have the following function definition :

let myfun param=
   let res=Marshal.from_channel stdin [] in
     if res=param then
       res
     else res
;;

Since the type of "Pervasives.=" is "'a -> 'a -> bool",
I was expecting :

myfun : 'a -> 'a

I got instead :

myfun : 'a -> 'b

Is it normal ?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-04-26 13:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-26 11:15 Type inference question Julien Verlaguet
2005-04-26 12:00 ` [Caml-list] " Jean-Christophe Filliatre
2005-04-26 13:19   ` Mark Shinwell
2005-04-26 13:41     ` Andreas Rossberg
2005-04-26 13:45       ` Mark Shinwell
2005-04-26 13:54     ` Jacques Garrigue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).