<div dir="ltr">Well... there's that rather worrisome introductory paragraph of the Data.Composition docs, though:<div><br></div><div><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px;line-height:18.2px">"This module is for convenience and demonstrative purposes more than it is for providing actual value. I do not recommend that you rely on this module for performance-sensitive code. Because this module is not based on Prelude's (.), some chances at optimization might be missed by your compiler."</span><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 19, 2016 at 7:51 AM, Alex Belanger <span dir="ltr"><<a href="mailto:i.caught.air@gmail.com" target="_blank">i.caught.air@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I didn't even know about the composition package. I just wanted it to be readily available to everyone.</p>
<p dir="ltr">A quick look, `composition` seems really nice and is probably more aligned with Haskell ecosystem's philosophy of keeping base to what is only stricly needed by GHC.</p>
<p dir="ltr">These were some valuable feedback. I think I got my answer and we can let the thread die (:</p>
<p dir="ltr">Much appreciated,<br>
Alex</p><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 19, 2016 9:08 AM, "Alexander Berntsen" <<a href="mailto:alexander@plaimi.net" target="_blank">alexander@plaimi.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA512<br>
<br>
On 18/08/16 23:57, Mike Ledger wrote:<br>
> IMO: I've never seen a compelling use of this; I think it decreases<br>
> clarity, and barely shaves off any characters from equivalent "pointful"<br>
> expressions.<br>
<br>
I think it quite compelling. An example:<br>
<br>
asSeconds :: Hour h -> Minute m -> Second s -> Second t<br>
- -- | asSeconds take some 'TimeUnit's and convert them to 'Second's.<br>
asSeconds h m s = MkSecond $ 3600 * timeVal h + 60 * timeVal m + timeVal s<br>
<br>
hmsToDiffTime :: Hour h -> Minute m -> Second s -> DiffTime<br>
- -- | 'hmsToDiffTime' converts time of day in hours, minutes and seconds to the<br>
- -- time from midnight as a 'DiffTime'.<br>
hmsToDiffTime = (secondsToDiffTime . timeVal) .:. asSeconds<br>
<br>
<br>
As for putting it in base -- meh. I use the composition package, or<br>
define it myself. So I agree with Oleg; -1.<br>
- --<br>
Alexander<br>
<a href="mailto:alexander@plaimi.net" target="_blank">alexander@plaimi.net</a><br>
<a href="https://secure.plaimi.net/~alexander" rel="noreferrer" target="_blank">https://secure.plaimi.net/~ale<wbr>xander</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2<br>
<br>
iQIcBAEBCgAGBQJXtwTXAAoJENQqWd<wbr>RUGk8BP/UQAIcKzqVRhkVs0qtFDneT<wbr>pSIi<br>
jLPPXMELbMnQe/ZQH2c5SaVM4+eDJI<wbr>ky33FEzrh9FWMeDftz1QFrsC+pPq+<wbr>5/Esw<br>
U3h1HJrAJKl+zZ/bC1GQj9ObWKNROj<wbr>3jEEt9pyNBcoHpxVnCohD3Y6Gx2Lkn<wbr>E7m0<br>
hnFlO0rCZZamk+pSeSlmLkkDM/MNxT<wbr>x/FQcuZT0omxZtvzrz4cN7a069Gx35<wbr>C+vr<br>
RK6NpiD5NUqTvMCL0zeI2yRpg2GV2P<wbr>QcwV0CEWjLCsJYMcoeiF8+prSBdwza<wbr>tgjH<br>
7k1bHUdGwvcRzB74dyxIOPyHBgIDUF<wbr>zj7bcE+NT0V20WXaz/Jgl73zZaIG9X<wbr>tW19<br>
aJ+RzW+aBSLEh8+uERc+Al9NpM9dLR<wbr>94mDWIK/MZWEmlFHo8+W/md27+<wbr>OxvM5BOr<br>
YCRpoQYeYDkepTAyRK2wRlszFXydDz<wbr>e8K6PMAq4DUE7xtUXofEbcodWA0quL<wbr>xP4N<br>
ro2A8E4kqnO6BVD7iN+qch8TxmEiVY<wbr>pqZnAjNz8eSyQCdn9UORpcMLT8yQ96<wbr>3nml<br>
17yKRjHYDwg/g8EC1UjqJ9KwVFRhqQ<wbr>wdk//IupRyZ/5PPkEChy8t/<wbr>ZjmmGKfLy0H<br>
CfhpRiNi0ozR+bYpUJcOdNM0ckCzgq<wbr>5++9+M643RGjNWvD4fKDI8idNNn9eL<wbr>lcom<br>
kaABFBC5Gbx2O6/rgpHc<br>
=X/Rb<br>
-----END PGP SIGNATURE-----<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>
</div></div><br>______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div><br></div>