Add Sieve implementation for Cayley

This commit is contained in:
Kiana Sheibani 2023-03-07 13:16:27 -05:00
parent bb7814b7af
commit 3d350068c5
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -54,6 +54,10 @@ Functor f => Mapping p => Mapping (Cayley f p) where
map' (MkCayley p) = MkCayley (map' <$> p)
roam f (MkCayley p) = MkCayley (roam f <$> p)
export
Functor g => Sieve p f => Sieve (Cayley g p) (g . f) using Functor.Compose where
sieve (MkCayley p) x = ($ x) . sieve <$> p
export
mapCayley : (forall x. f x -> g x) -> Cayley f p a b -> Cayley g p a b