Proposal: Add (<$>) to Prelude as part of the AMP in GHC 7.10-RC3
Richard Eisenberg
eir at cis.upenn.edu
Tue Feb 24 16:03:23 UTC 2015
This is a tough call for me.
This change will be very annoying, I think. When updating for 7.10, I was quite surprised that I still needed to import Control.Applicative for <$>, and put in the CPP to do so. Now I'll have to remove that from quite a few modules. Given that we plan only a week for RC3, there are a lot of modules in the ecosystem that will have to be updated within that week!
Of course, an author who doesn't update (by removing the now-redundant import of <$>) just gets a warning, but it's still annoying.
In my opinion, little changes like this, made right before the deadline, make Haskell feel more like a little research language than something meant to support industrial work.
All that said, I desperately miss having <$> in the Prelude in 7.10. Hence the tough call.
0 from me, then.
Richard
On Feb 24, 2015, at 10:47 AM, Christopher Reichert <creichert07 at gmail.com> wrote:
>
> +1 on <$>. Indifferent on <$.
>
> -Christopher
>
> On Tue, Feb 24 2015, Edward Kmett <ekmett at gmail.com> wrote:
>> We have a couple of weeks until the third release candidate for GHC 7.10
>> goes out the door.
>>
>> Along the way with the last couple of release candidates folks have found
>> some problems with the way we implemented the AMP. [1][2]
>>
>> Most notably, we failed to include (<$>) in the Prelude, so the standard
>> idiom of
>>
>> foo <$> bar <*> baz <*> quux
>>
>> doesn't work out of the box!
>>
>> I'd like to include (<$>) in the Prelude in RC3.
>>
>> I'd also like to invite discussion about whether folks believe we should
>> include (<$) out of the box.
>>
>> (<$) has been a member of Functor for a long time, which is only visible if
>> you import it from Data.Functor or bring in Control.Applicative. There is
>> an idiom that you use (<*) and (<$) to point to the parts of the structure
>> that you want to keep the answers from when building longer such
>> Applicative chains.
>>
>> Discussion Period: 2 weeks
>>
>> Thank you,
>> -Edward Kmett
>>
>> [1] http://www.reddit.com/r/haskell/comments/2wzixa/shouldnt_be_in_prelude/
>> [2] https://plus.google.com/115504368969270249241/posts/URzeDWd7qMp
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> --
> Christopher Reichert
> irc: creichert
> gpg: C81D 18C8 862A 3618 1376 FFA5 6BFC A992 9955 929B
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
More information about the Libraries
mailing list