<div dir="ltr">The number of name conflicts here has me rather conflicted.<div><br></div><div>To date, we've been treating the Prelude is a very precious common namespace.</div><div><br></div><div>Every name it takes is a significant cost because now every other use of the name, pre-existing or not, has to explicitly _hide_ the import from the Prelude, not just in their library code, but in all the code that uses the library.</div><div><br></div><div><div>By comparison, the Data.List.singleton issue was comparatively clash-free as most uses of a combinator with the same name were already qualified, and we were able to mitigate the remaining issues, by deciding that the module in question was intended to become qualified after a short cycle, so no "global" name is being used up.</div><div><br></div><div>Here, we're finding several conflicting combinators, and the cost is significantly higher for each of the existing consumers of that name to work around.</div><div><br></div><div>It strikes me that in the end there'd be a lot of churn, as all existing users of conflicting versions of this very short punchy name would have to move to a new name or endure a ton of Prelude hiding clauses all over their code, in both library and consumer code.<br></div><div><br></div><div><div>This leaves me inclined to a -1.</div><div></div></div><div><br></div><div>There are combinators I'm somewhat inclined to push into Prelude after an appropriate referendum, e.g. traverse_ or sequence_ which do a lot of work and are quite conspicuous in their absence, when a worse-for-many-applications but comparable tool is closer to hand, but the slight pain of explicitly importing 'on' seems pretty reasonable given the combination of its somewhat confusing at first idiomatic usage, and the somewhat broadly spread existing name conflicts.</div><div><br></div><div>-Edward</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 10, 2019 at 3:59 PM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Indeed, there are a lot more conflicts than I'd have expected. Ignoring functions with the same type, Hoogle shows this name in the below packages. I have no sense of the overall significance of the specific packages or (equally importantly) of the `on` function within each.<div dir="auto"><br></div><div dir="auto">haskell-gi-base:</div><div dir="auto">on :: forall object info m . (GObject object, MonadIO m, SignalInfo info) => object -> SignalProxy object info -> HaskellCallbackType info -> m SignalHandlerId<br></div><div dir="auto"><br></div><div dir="auto">brick:</div><div dir="auto">on :: Color -> Color -> Attr<br></div><div dir="auto"><br></div><div dir="auto">esqueletto:</div><div dir="auto">on :: SqlExpr (Value Bool) -> SqlQuery ()<br></div><div dir="auto"><br></div><div dir="auto">relational-query (both):</div><div dir="auto">on :: MonadQuery m => Predicate Flat -> m ()<br></div><div dir="auto">on :: MonadQuery m => QueryA m (Predicate Flat) ()<br></div><div dir="auto"><br></div><div dir="auto">threepenny-gui:</div><div dir="auto">on :: (element -> Event a) -> element -> (a -> UI void) -> UI ()<br></div><div dir="auto"><br></div><div dir="auto">miso:</div><div dir="auto">on :: MisoString -> Decoder r -> (r -> action) -> Attribute action<br></div><div dir="auto"><br></div><div dir="auto">wild-bind:</div><div dir="auto">on :: i -> v -> Binder i v ()<br></div><div dir="auto"><br></div><div dir="auto">massiv-io:</div><div dir="auto">on :: Pixel X Bit<br></div><div dir="auto"><br></div><div dir="auto">selda-postgresql:</div><div dir="auto">on :: Text -> Text -> PGConnectInfo</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 10, 2019, 6:42 PM Ryan Trinkle <<a href="mailto:ryan.trinkle@gmail.com" target="_blank">ryan.trinkle@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">One note: this does conflict with some other libraries, for instance GTK2HS<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 10, 2019 at 6:26 PM chessai . <<a href="mailto:chessai1996@gmail.com" rel="noreferrer" target="_blank">chessai1996@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">+1</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 10, 2019, 5:53 PM David Feuer <<a href="mailto:david.feuer@gmail.com" rel="noreferrer" target="_blank">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Every time I reach for Data.Function.on, I feel like a total dolt for having to import a module to get a function whose implementation is barely longer than the import. And it's a really good function too! Can we please add it to the Prelude?<div dir="auto"><br></div><div dir="auto"><div dir="auto"> on :: (b -> b -> c) -> (a -> b) -> a -> a -> c</div><div dir="auto"> (.*.) `on` f = \x y -> f x .*. f y</div></div></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
</blockquote></div></div></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>