Instance of Pointed and Copointed for the types in GHC.Generics would be handy. I'm unsure what all of them would be, including Pointed (f :+: g), Copointed (f :+: g), and Copointed (f :*: g).
Here are a few instances:
instance Pointed Par1 where
point = Par1
instance (Pointed f, Pointed g) => Pointed (f :*: g) where
point a = point a :*: point a
instance (Pointed f, Pointed g) => Pointed (g :.: f) where
point = Comp1 . point . point
instance Copointed Par1 where
copoint = unPar1
instance (Copointed f, Copointed g) => Copointed (g :.: f) where
copoint = copoint . copoint . unComp1
I could whip up some more and submit a pull request.
Instance of
Pointed
andCopointed
for the types inGHC.Generics
would be handy. I'm unsure what all of them would be, includingPointed (f :+: g)
,Copointed (f :+: g)
, andCopointed (f :*: g)
.Here are a few instances:
I could whip up some more and submit a pull request.