Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
When is a function polymorphic?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] When is a function polymorphic?
From: Yaron Minsky <>

> Interesting.  I guess this is best understood as a limitation of the
> type-checking algorithm.  Does anyone know if there are any plans to
> remove this limitation?  Are there fundamental reasons why it would be
> difficult to do so?

This is not a limitation of the type checking algorithm per se.
Rather, the type checking algorithm prefers not to use
exhaustiveness information when this can be avoided, to keep it
(Exhaustiveness is only used for polymorphic variants, but for
a deeper reason.)

Is it so difficult to make the extra constructors explicit?

Jacques Garrigue