Proposal: Add Data instance for Const

Eric Mertens emertens at
Wed Nov 2 15:41:47 UTC 2016

> On Nov 2, 2016, at 8:40 AM, Ryan Scott < at> wrote:
> GHC Trac #12438 [1] exists because there's no Data instance for Const
> in base. I found this quite surprising, since we have Data instances
> for just about every other type combinator out there (Identity, Sum,
> Product, Compose, etc.), but not for Const. The fix for #12438 would
> be quite simple: I propose we add
>    deriving instance (Data a, Data b) => Data (Const a b)
> to Data.Data in base. Any objections?

Seems like an oversight worth correcting to me.


More information about the Libraries mailing list