----------------------------------------------------------------------------- -- | -- Module : Control.Functor.HigherOrder -- Copyright : (C) 2008 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward Kmett -- Stability : experimental -- Portability : non-portable (rank-2 polymorphism) -- -- Neil Ghani and Particia Johann''s higher order functors from -- ---------------------------------------------------------------------------- module Control.Functor.HigherOrder where import Control.Functor.Extras type AlgH f g = Natural (f g) g type CoAlgH f g = Natural g (f g) class HFunctor f where ffmap :: Functor g => (a -> b) -> f g a -> f g b hfmap :: Natural g h -> Natural (f g) (f h) newtype FixH f a = InH { outH :: f (FixH f) a }