1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Define a Listable1 instance over (Listable1 f, Listable a) => CofreeF f a.

This commit is contained in:
Rob Rix 2017-01-07 09:07:48 -05:00
parent 8a06e024f5
commit a9ba058cf9

View File

@ -79,6 +79,9 @@ instance Listable2 These where
instance Listable1 f => Listable2 (CofreeF f) where
liftTiers2 annotationTiers recurTiers = liftCons2 annotationTiers (liftTiers recurTiers) (:<)
instance (Listable1 f, Listable a) => Listable1 (CofreeF f a) where
liftTiers = liftTiers2 tiers
instance Listable1 f => Listable1 (Cofree f) where
liftTiers annotationTiers = go
where go = liftCons1 (liftTiers2 annotationTiers go) cofree