Drastic Prelude changes imminent
Neil Mitchell
ndmitchell at gmail.com
Wed Jan 28 21:24:51 UTC 2015
>>> Just to be clear, this isn't my proposal: it's from Lennart and Neil.
>>>
>> The ghc warning for importing Data.List should be as helpful as possible,
>> something like:
>>
>> Foo:5:1 Warning: Data.List imported unqualified, this will conflict with
>> BBP.
>>
>> Instead use 'import Data.List(maximumBy, sortBy)'
>
> Upon reflection, I am prepared to seriously consider this approach.
It should be noted that while I was there with Lennart when we talked
about the problems, my viewpoints and Lennart's are not identical. I
think the decision was insufficiently communicated (as seems to be
universally agreed), I think it's probably a bad idea to ever make
this change (I may well be in the minority here), and that the change
was done in the wrong way (see
http://neilmitchell.blogspot.co.uk/2014/10/how-to-rewrite-prelude.html
for how I think it should have been approached).
However, I'm not a fan of importing List qualified (I find that deeply
ugly), and a warning that I can't disable compatibly in older version
of GHC without CPP is pretty annoying - the GHC warning checker will
then be dictating personal style, and (in my very personal opinion) be
in the wrong. I raised this issue in October, I fought my corner
through blog posts and reddit, and I lost - I considered that the end.
The Core libraries committee have done the work, and at this stage, to
back out will be a fantastic amount of work. I don't have the time to
put in that amount of work, and I think it unfair to demand those who
are for BBP to do the work for me.
At the same time, I have more than once picked the "easy option" in
the short term when coding, been warned by Lennart that I was making a
mistake, and then discovered down the line that Lennart was right.
Making mistakes with Prelude is going to be costly.
Thanks, Neil
More information about the Libraries
mailing list