Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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. ::