I forgot to add the Exposed file. Oops.

This commit is contained in:
Paweł Nowak 2014-10-30 13:27:02 +01:00
parent 3ccb3a45f9
commit 3fdd47d71f

View File

@ -0,0 +1,26 @@
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{- |
Module : Data.Profunctor.Exposed
Description : Exposes Kleisli category structure beneath a profunctor.
Copyright : (c) Paweł Nowak
License : MIT
Maintainer : Paweł Nowak <pawel834@gmail.com>
Stability : experimental
-}
module Data.Profunctor.Exposed where
import Data.Profunctor
-- | Exposes structure of a Kleisli category beneath a profunctor.
--
-- Should obey laws:
--
-- > merge . rmap return = id
-- > lmap return . expose = id
-- > rmap (>>= f) = merge . rmap (fmap f)
-- > lmap (fmap f) . expose = expose . lmap f
class (Monad m, Profunctor p) => Exposed m p | p -> m where
expose :: p a b -> p (m a) b
merge :: p a (m b) -> p a b