traverse_

Edward Kmett ekmett at gmail.com
Tue Mar 31 15:27:34 UTC 2015


I have no objection to having the discussion about widening the set of
symbols to shave off warts like this in 7.12.

-Edward

On Tue, Mar 31, 2015 at 10:11 AM, Fumiaki Kinoshita <fumiexcel at gmail.com>
wrote:

> I understand the ground. It seems reasonable not to add symbols facilely.
>
> But in this case, the "too specialized" version is exported while more
> fundamental one is not.
> Although folks (including me) use mapM_ mostly today, someday we will like
> to have traverse_, I guess.
>
> 2015-03-31 19:41 GMT+09:00 Edward Kmett <ekmett at gmail.com>:
>
>> We deliberately took no more symbols than we needed in 7.10 from Prelude
>> as part of the Foldable/Traversable Proposal. There are multiple
>> combinators in Data.Foldable and Data.Traversable that we do not export.
>> traverse_ is one of them as, strictly speaking, traverse_ was a symbol we
>> didn't have to take.
>>
>> If we had would anybody have complained any more loudly? Not sure... but
>> it was a deliberate choice to not bring in any symbols into Prelude that
>> weren't already there that weren't part of the definition of a class or
>> needed to define instances that already existed.
>>
>> -Edward
>>
>> On Mon, Mar 30, 2015 at 11:33 PM, Fumiaki Kinoshita <fumiexcel at gmail.com>
>> wrote:
>>
>>> Well, I see. It'd be nice.
>>>
>>> That aside, the absence of traverse_ doesn't seem to be intended (even
>>> the documentation for mapM_ says "mapM_ is just traverse_"!)
>>>
>>> 2015-03-30 16:54 GMT+09:00 Herbert Valerio Riedel <hvr at gnu.org>:
>>>
>>>> On 2015-03-30 at 07:05:56 +0200, Fumiaki Kinoshita wrote:
>>>>
>>>> [...]
>>>>
>>>> > I found out that (<>) (in Data.Monoid) is missing, also. It would be
>>>> nice
>>>> > to reexamine Prelude to export things we want to export.
>>>>
>>>> Fwiw, (<>) was actually left-out as it wasn't required (it's just a an
>>>> alias for `mappend`), *and* to keep our options open (or at least not
>>>> make it more difficult) in terms of possible migration-plans available
>>>> for the case we'd be moving 'Semigroup' to base/Prelude at some point in
>>>> the future.
>>>>
>>>>
>>>
>>> _______________________________________________
>>> ghc-devs mailing list
>>> ghc-devs at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150331/6be3d1ea/attachment.html>


More information about the Libraries mailing list