English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Same label in different types, how do people solve this?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-12-15 (12:58)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: Functions must be explicitly typed, (was Same label in different types, how do people solve this?)
John Max Skaller wrote:
> In Ocaml, terse expression with the _option_ of adding a type
> constraint isn't that unreasonable. The real problem is that
> the inference engine isn't smart enough to remember _how_ it
> deduced a type, and report _both_ locations when there is a
> conflict. I have a suspicion this is non-trivial:

It is non-trivial because in general the deduction of a type involves
arbitrary many `locations'. So you actually had to report some kind of
unification trace, which might not be very helpful for the unprepared
programmer if it gets too complicated. The actual problem is to find
useful heuristics for identifying the `interesting' parts of this
information and for presenting it to the user.

> probably worth a PhD. :-)

There is in fact research going on on this topic, some of it certainly
being done by PhD students. ;-)

Andreas Rossberg, rossberg@ps.uni-sb.de

:: be declarative. be functional. just be. ::