Browse thread
Polymorphic variants question
[
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: | 2006-09-03 (01:12) |
From: | Andres Varon <avaron@g...> |
Subject: | Re: [Caml-list] Polymorphic variants problem |
> > Now, I just tried to use my super term union, but I ran > into a problem. It looks like a fault in type inference, > something like this: > > let f (x:[`A|`B]) = .. > let g (x:[`A]) = .. > .. > fun x -> > f x; > g x; > .. > You have to define it as follows: let f (x : [< `A | `B ]) = .. let g (x : [`A]) = to let the compiler know that the argument of f could be refined further.