<div dir="ltr">I'd like to see how warm people would be to catching GHC's type error quality up a bit.<div><br></div><div>I did a write-up on a confusion a reader of our book had:</div><div><br></div><div><a href="https://gist.github.com/bitemyapp/c27c721b92dab0248433">https://gist.github.com/bitemyapp/c27c721b92dab0248433</a> <br clear="all"><div><br></div><div>This is not new. A lot of people complain about this particular type error in particular when they say GHC has bad type errors. I don't think GHC's type errors are bad, but I do think they could be improved and this particular issue has an unfortunate source to sink distance.</div><div><br></div><div>I would rather type error improvements not be buried behind a "silly beginners only" flag and that they just be part of improving the UX for everyone. With that proviso, how likely would specialized type error hints and some general error message fix ups be regarded?</div><div><br></div><div>By specialized I mean, "detect that they tried to find an instance of Num for (-> something something) and suggest that they did the wrong thing, with possible fixes: X Y Z". Ideally before the "hey do you want FlexibleContexts?!" thing fires.</div><div><br></div><div>I do not think I am capable of doing this, but being able to zoom in, clang style, to the expression where they are (probably accidentally) using a function like a Num or a Num like a function would be pretty valuable so they don't have to guess-n-check parenthesize their code.</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr">Chris Allen<br></div></div></div></div>
</div></div>