blob: e2597b622cf1dfa90dfd3feb9e8d0b9258259796 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{-# LANGUAGE UnicodeSyntax, RankNTypes, TypeFamilies #-}
module T5595 where
import Data.Kind (Type)
class MonadTransControl t where
type St t :: Type → Type
liftControl :: Monad m =>(Run t → m a) → t m a
restore :: Monad o => St t y → t o y
type Run t = forall n b. Monad n => t n b → n (St t b)
foo :: (Monad m, MonadTransControl t) => (Run t -> m a) -> t m a
foo f = liftControl f
|