Created
February 22, 2015 10:34
-
-
Save fumieval/3b894b3bea867594b8d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Object | |
echo' :: Object f (Coyoneda f) | |
echo' = Object $ Coyoneda (\x -> (x, echo')) | |
(@>>>@) :: Object f (Coyoneda g) -> Object g (Coyoneda h) -> Object f (Coyoneda h) | |
Object m @>>>@ Object n = Object $ \f -> case m f of | |
Coyoneda k g -> case n g of | |
Coyoneda l h -> Coyoneda (\x -> case l x of (y, ogh) -> case k y of (z, ofg) -> (z, ofg @>>>@ ogh)) h | |
infixr 1 @>>>@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment