Eq1, Show1 etc. instances for Data.Semigroup.{First,Last}
Motivation
I was surprised by the following problem:
λ> Compose $ Just $ First 1
<interactive>:3:1: error:
• No instance for (Data.Functor.Classes.Show1 First)
arising from a use of ‘print’
• In a stmt of an interactive GHCi command: print it
I expect that once Data.Monoid.{First,Last}
are deprecated (#15028 (closed)) people will want to use (Compose Maybe Data.Semigroup.First)
or similar constructs. In that case they will need instances for the classes in Data.Functor.Classes
.
Proposal
Add Eq1
, Ord1
, Read1
and Show1
instances for Data.Semigroup.{First,Last}
.