e7599cf2fbcdc1774b402cfaeb00daad8f25a4ac
[ghc.git] / testsuite / tests / typecheck / should_compile / T5595.hs
1 {-# LANGUAGE UnicodeSyntax, RankNTypes, TypeFamilies #-}
2 module T5595 where
3
4 class MonadTransControl t where
5 type St t :: **
6
7 liftControl :: Monad m =>(Run t → m a) → t m a
8
9 restore :: Monad o => St t y → t o y
10
11 type Run t = forall n b. Monad n => t n b → n (St t b)
12
13 foo :: (Monad m, MonadTransControl t) => (Run t -> m a) -> t m a
14 foo f = liftControl f