Proposal: Add conspicuously missing Functor instances for tuples
Henning Thielemann
lemming at henning-thielemann.de
Mon Jan 18 20:42:34 UTC 2016
On Mon, 18 Jan 2016, David Feuer wrote:
> Actually, I currently get a much worse error message:
>
> Prelude> fmap (+1) (1,2,3)
>
> <interactive>:2:1:
> Non type-variable argument in the constraint: Functor ((,,) t t)
> (Use FlexibleContexts to permit this)
> When checking that ‘it’ has the inferred type
> it :: forall b t t1.
> (Functor ((,,) t t1), Num b, Num t, Num t1) =>
> (t, t1, b)
>
> That there is a *lousy* error message.
indeed
> I understand that there are newcomers who struggle to understand the
> difference between tuples and lists; I don't think that's a good
> enough reason to omit a good and valid instance.
I would not qualify myself as a newcomer. For me these instances are a
problem, not a help.
More information about the Libraries
mailing list