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

Define a Listable2 instance over Listable1 f => FreeF f.

This commit is contained in:
Rob Rix 2017-01-05 15:47:18 -05:00
parent 378acc4fc9
commit b63dab4641

View File

@ -82,3 +82,6 @@ instance Listable1 f => Listable2 (CofreeF f) where
instance Listable1 f => Listable1 (Cofree f) where instance Listable1 f => Listable1 (Cofree f) where
liftTiers annotationTiers = go liftTiers annotationTiers = go
where go = liftCons1 (liftTiers2 annotationTiers go) cofree where go = liftCons1 (liftTiers2 annotationTiers go) cofree
instance Listable1 f => Listable2 (FreeF f) where
liftTiers2 pureTiers recurTiers = liftCons1 pureTiers Pure \/ liftCons1 (liftTiers recurTiers) Free