Last active
August 25, 2019 06:37
-
-
Save masaeedu/55221d2ba17002adffc4e4c69b89e507 to your computer and use it in GitHub Desktop.
failing at contramapping entailment
This file contains hidden or 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
type Whatever | |
(c :: k -> Constraint) | |
(f :: k -> *) | |
(v :: k) | |
= forall x. (c v => f v -> x) -> x | |
class Everything (a :: k) | |
instance Everything a | |
foo :: (forall x. (cb b => x) -> (ca a => x), f b -> f a) -> (ca a => f a) -> (cb b => f b) | |
foo (cba, | |
-- type family Append (a :: k -> Constraint) (b :: k -> Constraint) :: k -> Constraint | |
-- where | |
-- Append f g = | |
-- instance (a x, b x) => Both a b (a | |
-- foo :: Whatever (MonadError String) Monad a -> Whatever Everything Everything (Either String a) | |
-- foo ma cb = cb $ ma runExceptT | |
test :: Monad m => ExceptT e m a -> m (Either e a) | |
test = runExceptT | |
-- interpretReader scroll = flip runReaderT scroll | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment