Adding Applicative/Functor instances to all Monads in GHC

David Luposchainsky dluposchainsky at
Fri May 17 20:59:53 CEST 2013

On 2013-05-17 20:48, Ian Lynagh wrote:


> Ah, so you're talking about the GHC code /and/ all of the libraries that
> come with GHC? I'd be in favour of adding the instances to the libraries.
When I say "GHC" here I mean "everything that comes with GHC and is
needed to compile it", more specifically what 'git clone; sync-all get'

>> Suppose 7.8 includes all instances as proposed, and we're going up to
>> 7.14 in a couple of years, and 8.0 introduces the new hierarchy.
>> Everything down to 7.8 will be compilable by 8.0
> No, it won't. Unrelated to this proposal, you can't build GHC version X
> with GHC version Y, where Y > X.
Oh, I thought what you said was a counter argument because of
compatibility issues. In that case you probably meant the change is
redundant at this point, which is certainly true for all practical purposes.
However, I think it's important that we keep an track of how many
changes would be necessary in case the new hierarchy is introduced, and
adding those early on will save a ton of work later. This holds for GHC
now, and then in the next step for Hackage. In an ideal world, changing
the hierarchy (moving a couple of lines from Applicative to Prelude)
breaks no code except issuing "redundant import of Applicative" warnings
maybe, and the goal of my efforts here is to get as close as possible to


More information about the Libraries mailing list