category-extras-0.53.5: Various modules and constructs inspired by category theory

Portabilitynon-portable (rank-2 polymorphism)
MaintainerEdward Kmett <>



Martin Erwig's metamorphisms for indexed data types.

ADT fusion: snd c . fst c == id => erwig d id c . erwig c id d' = erwig d id d'

FreeMeta: l strict, snd c == snd c' == phi', fst d == fst d' == alpha, l . fst c = fst c' . fmap l, snd d' . rr = fmap r . snd d ==> l . (erwig d id c) = (erwig d' id c') . r



meta :: Functor h => Bialgebra m n b -> (h :~> m) -> Bialgebra f h a -> a -> bSource

meta d f c is Martin Erwig's metamorphism from c to d