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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Julian Assange <proff@i...>
Subject: polymorphic variant oddity


let `F x = x;;   
Unbound value x
# let `F x = 1;;
This expression has type int but is here used with type [< `F of 'a | ..]
# let `F x = `F 1;;
val x : int = 1
# `F 4;;
- : [> `F of int] = `F 4

What exactly is the meaning this?