maybeRead in base
ekmett at gmail.com
Wed Aug 15 19:02:39 CEST 2012
I'm not a huge fan of (.:), but you insist on adding it, please generalize
it to fmap.fmap.
(.:) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
This subsumes the other use case.
On Tue, Aug 14, 2012 at 5:32 AM, David McGillicuddy
<dmcgill9071 at gmail.com>wrote:
> What about (.:)*? Just looking at Hayoo quickly, at least half a dozen
> libraries seem to have defined it and it's a permanent feature on lambdabot.
> *(.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
> (.:) = (.) (.) (.)
> On Tue, Aug 14, 2012 at 7:54 AM, Simon Hengel <sol at typeful.net> wrote:
>> On Mon, Aug 13, 2012 at 10:31:19PM -0400, Tom Murphy wrote:
>> > It would be great to have maybeRead in base in time for the next Haskell
>> > Platform release. There's been talk about including it several times,
>> > it's remained as a utility function in other libraries (Network.CGI, for
>> > example, if I'm remembering right).
>> It's in base-18.104.22.168, but it's called readMaybe (personally, I don't
>> like that name, but I guess it's for consistency with readEither).
>> Libraries mailing list
>> Libraries at haskell.org
> Libraries mailing list
> Libraries at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries