Version française
Home     About     Download     Resources     Contact us    
Browse thread
bizarre type
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Julien Verlaguet <Julien.Verlaguet@p...>
Subject: bizarre type
I would like to know if the following behavior is normal :

type 'a t=string ;;

# let g (x : 'a t) (y : 'a)=();;
val g : 'a t -> 'a -> unit = <fun>

# g ("hello" : int t);;
- : '_a -> unit = <fun>

I was expecting: (int -> unit).

J