Browse thread
Type inference question
- Julien Verlaguet
[
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: | -- (:) |
| From: | Julien Verlaguet <Julien.Verlaguet@p...> |
| Subject: | Type inference question |
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 ?