Version française
Home     About     Download     Resources     Contact us    
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 <yminsky@gmail.com>

> 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
predictable.
(Exhaustiveness is only used for polymorphic variants, but for
a deeper reason.)

Is it so difficult to make the extra constructors explicit?

Jacques Garrigue