Ron de Bruijn wrote:
Ur/Web: fun myget default o = case o of | (Some x) => x | _ => defaultreturns an error message showing all the types in the module, of which 99.9% is completely unrelated, which approaches 100% as the size of the module grows to infinity. It can even take a minute or so for large modules to print the dancing error message.
The "unresolved unification variable" error message can certainly be improved by focusing only on code pieces with unification variables. From your discussion below, I see you do agree that [myget] _is_ in error, according to the type system of Ur.
Perhaps there is some exotic type at which this piece of text could _also_ be interpreted, but without a type-annotation this should just work and use the same derived type as in Haskell.
It would be interesting to experiment with adding Hindley-Milner style polymorphism inference. I just haven't done it yet. Maybe someone else wants to try? :)
It remains not obvious to me that inference of polymorphism at definitions has a serious, measurable effect on programming effectiveness.
I also believe that this translates to the fact that Ur definitions and modules are typically much larger than their Haskell equivalents.
It is not obvious to me that larger code is axiomatically worse. Consider tiny Perl scripts that are much harder to understand than longer Haskell programs. ;)
And, of course, I'm quite convinced that Ur code for interesting metaprogramming will be much shorter and simpler than in Haskell.
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
