[Haskell-cafe] Extending the idea of a general Num to other types?
Sterling Clover
s.clover at gmail.com
Tue Sep 4 23:56:12 EDT 2007
On Sep 4, 2007, at 5:03 PM, Peter Verswyvelen wrote:
> Otherwise you would need a very clever compiler/editor machine
> learning system, that looks at how a class of users fixes a certain
> error, so the compiler can adapt its error message the next time a
> similar pattern occurs (which is science fiction right now I think...)
On that note, I've been finding GHC's type suggestions often worse
than useless, and wish it wouldn't even bother to try -- even more
confusing for new users to have the compiler suggest pointless things
like declaring an instance of Num String or whatever. I'd prefer it
if it could just tell me what *specific* part of an expression, which
symbol even, the expected and inferred values differed. On the other
hand, when trying to guess at operator precedence rules, the "applied
to too many" and "applied to too few" errors are actually pretty handy.
--S
More information about the Haskell-Cafe
mailing list