Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b
Bryan Richter
b at chreekat.net
Thu Mar 30 21:36:50 UTC 2017
- Previous message: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b
- Next message: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Thu, Mar 30, 2017 at 11:18:10PM +0200, Henning Thielemann wrote:
>
> On Thu, 30 Mar 2017, Bryan Richter wrote:
>
> >My intuition, based on observed usage in Haskell and elsewhere, is
> >that tuples are used as anonymous product types. Thus, I am
> >interested in the rationale for making them Functors because I feel
> >it has denied me a common, valuable tool. I no longer feel that I
> >should use pairs as product types. By making "(,) a" a Functor, it is
> >no longer an anonymous product type —— it is an anonymous Reader. Are
> >anonymous Readers really all that much more valuable than anonymous
> >product types? I cannot conceive it. I must be missing something.
>
> Pairs as functors are Writers. The function type got a Functor
> instance that corresponds to Readers.
Oops, laziness of the bad sort on my own part. :)
> I think the only reason is that some programmers got "laziness" wrong
> and try to use primitive types for everything instead of using (and
> importing) dedicated types.
Well, is there anything to be done for it at this point? Is there even
any consensus that this was, in retrospect, a poor choice?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170330/6e83e92b/attachment.sig>
- Previous message: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b
- Next message: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Libraries
mailing list