From 157d931ad8f6ce63ef44e4bf7d3b804546d2d549 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 15 Jul 2019 16:20:27 -0400 Subject: [PATCH] :fire: TransC. --- semantic-core/src/Control/Effect/Readline.hs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/semantic-core/src/Control/Effect/Readline.hs b/semantic-core/src/Control/Effect/Readline.hs index daf7fba73..540e63d11 100644 --- a/semantic-core/src/Control/Effect/Readline.hs +++ b/semantic-core/src/Control/Effect/Readline.hs @@ -11,7 +11,6 @@ module Control.Effect.Readline , ReadlineC (..) , runReadline , runReadlineWithHistory -, TransC (..) , ControlIOC (..) , runControlIO ) where @@ -21,7 +20,6 @@ import Prelude hiding (print) import Control.Effect.Carrier import Control.Effect.Lift import Control.Effect.Reader -import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Class import Data.Int @@ -89,13 +87,6 @@ runReadlineWithHistory block = do runReadline prefs settings block --- | Promote a monad transformer into an effect. -newtype TransC t (m :: * -> *) a = TransC { runTransC :: t m a } - deriving newtype (Applicative, Functor, Monad, MonadIO, MonadTrans) - -instance (Carrier sig m, Effect sig, Monad (t m), MonadTrans t) => Carrier sig (TransC t m) where - eff = TransC . join . lift . eff . handle (pure ()) (pure . (runTransC =<<)) - runControlIO :: (forall x . m x -> IO x) -> ControlIOC m a -> m a runControlIO handler = runReader (Handler handler) . runControlIOC