Proposal: Export (#.) and (.#) from Data.Coerce
Joachim Breitner
mail at joachim-breitner.de
Sun Apr 22 03:15:54 UTC 2018
Hi,
Am Freitag, den 20.04.2018, 15:56 -0400 schrieb Daniel Cartwright:
> I have recently been using Data.Coerce more frequently and think it
> would be useful to go ahead and export these from somewhere in base.
I expect the target audience of these functions to be pretty small
(they need to know what coerce does, they need to care and know about
the problem with composing newtype constructors with functions etc.) I
don’t think any of these will struggle to define their (#.) locally –
or simply call coerce directly on `f`, without specifying the unused
newtype constructor.
I am, however, worried about people who are not the target audience to
see these operators and shoot in their foot with them (e.g. passing a
function that “does something” as the first argument to #. and then
being very confused that things don’t work.).
The benefits don’t obviously outweigh the risks, so a mild hesitant -1
from me.
Cheers,
Joachim
--
Joachim “nomeata” Breitner
mail at joachim-breitner.de
https://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20180421/602941ce/attachment.sig>
More information about the Libraries
mailing list