Proposal: add `on` to the Prelude

Manuel Gómez targen at
Wed Sep 11 15:41:01 UTC 2019

On Wed, Sep 11, 2019 at 5:21 PM Oliver Charles <ollie at> wrote:
> That said, I would still prefer as many symbols as possible to have
> explicit binding sites, which means I would prefer to be explicit
> about my import to `on` rather than assume it from the Prelude.

I personally share this preference.  In my own code, I enable
NoImplicitPrelude and explicitly import symbols from whatever module
is the logical home for any given symbol.  As I have this personal
preference, I would explicitly `import Data.Function (on)` as I do
today, irrespective of the outcome of this proposal.  This is
generally possible for any symbol that is not actually defined in the
Prelude but merely re-exported from somewhere else.

I mean to say that this particular style neither benefits nor is
impaired much by this proposal.  There would still be a Prelude with
lots of symbols, and you will still be able to pretend there isn't one
to the benefit of explicit binding sites, to whichever degree you
personally favour.

More information about the Libraries mailing list