Hi list, Just a quick note to say that I recently made some big changes to the way type errors are displayed. No more traces, but only one message, precisely abbreviated.
I would like to encourage people to try it on the latest SVN, especially if you're having trouble using liquidsoap and understanding its error messages. Also, I'd be interested in feedback from advanced users as well as beginners: please tell me if you feel that this is an enhancement, and if you find examples where you think the error could be more helpful. Discussion may take place in this thread or on <http://dev.sourcefabric.org/browse/LS-459>. Now just a little demo and explanation... For example, with the incorrect expression fallback(transitions=[fun(x,y)->y+1]) we get: At line 1, char 22-36: this value has type [(_,int,...)->_] but it should be a subtype of [(_,source(_),...)->_] (The transition function takes an int (since it must add 1 to it) but it should take sources.) And with switch([(1h10,blank())]) we get: At line 1, char 8-23: this value has type [(bool*_)] but it should be a subtype of [((()->_)*_)] (The switching predicate is a bool but it should be a function that returns a bool, i.e. we forgot the braces around {1h10}.) The underscores (_) stand for types that don't need to be known to understand the error. The ellipsis (...) stands for a list of argument types that doesn't need to be known. Of course, it would sometimes feel better to see them (in the second example I'd prefer ()->bool to ()->_) but in general it makes the messages WAY shorter. I hope this will allow a lot of you to read and understand the errors, instead of trying to guess what it means. I hope you enjoy it! -- David PS: It's a pain in the ass to develop such a system, now I know why OCaml doesn't have a similar one... (remember, OCaml is NOT liquidsoap :p) ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
