Re-export `<$>` from Prelude
ClosedPublic

Authored by hvr on Feb 24 2015, 9:33 AM.

Details

Summary

Whether to re-export the <$> non-method operator from Prelude wasn't
explicitly covered in the original AMP proposal, but it turns out that
not doing so forces most code that makes use of applicatives to import
Data.Functor or Control.Applicative just to get that operator into
scope.

The down-side is that this increases the amount of redundant-import
warnings triggered, as well as the relatively minor issue of stealing
the <$> operator from the default namespace for good (although at this
point <$> is supposed to be ubiquitous anyway due to Applicative
being forced into the next Haskell Report...)

NOTE: This is just a proof-of-concept and requires a decision from the CLC

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hvr updated this revision to Diff 2302.Feb 24 2015, 9:33 AM
hvr retitled this revision from to Re-export `<$>` from Prelude.
hvr updated this object.
hvr edited the test plan for this revision. (Show Details)
hvr added reviewers: austin, ekmett.
austin accepted this revision.Feb 24 2015, 9:55 AM
austin edited edge metadata.

lgtm code-wise (I suspect the proposal will quickly go through).

This revision is now accepted and ready to land.Feb 24 2015, 9:55 AM
hvr edited edge metadata.Feb 24 2015, 10:00 AM
hvr updated the Trac tickets for this revision.

@austin I'm toying with the idea to land it early in the ghc-7.10 branch in a few days so we can distribute it early on with the ghc ppa to ppl for early testing before RC3

ekmett edited edge metadata.Feb 24 2015, 12:28 PM

If the rather overwhelmingly positive preliminary voting on this is any indication, we'll probably do both this and 681.

austin added a comment.Mar 3 2015, 7:08 AM

I think we should go ahead and land this.

ekmett accepted this revision.Mar 7 2015, 2:30 AM
ekmett edited edge metadata.

LGTM

This revision was automatically updated to reflect the committed changes.