Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 157d931

Browse files
committed
🔥 TransC.
1 parent 6fe74f0 commit 157d931

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

semantic-core/src/Control/Effect/Readline.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ module Control.Effect.Readline
1111
, ReadlineC (..)
1212
, runReadline
1313
, runReadlineWithHistory
14-
, TransC (..)
1514
, ControlIOC (..)
1615
, runControlIO
1716
) where
@@ -21,7 +20,6 @@ import Prelude hiding (print)
2120
import Control.Effect.Carrier
2221
import Control.Effect.Lift
2322
import Control.Effect.Reader
24-
import Control.Monad
2523
import Control.Monad.IO.Class
2624
import Control.Monad.Trans.Class
2725
import Data.Int
@@ -89,13 +87,6 @@ runReadlineWithHistory block = do
8987

9088
runReadline prefs settings block
9189

92-
-- | Promote a monad transformer into an effect.
93-
newtype TransC t (m :: * -> *) a = TransC { runTransC :: t m a }
94-
deriving newtype (Applicative, Functor, Monad, MonadIO, MonadTrans)
95-
96-
instance (Carrier sig m, Effect sig, Monad (t m), MonadTrans t) => Carrier sig (TransC t m) where
97-
eff = TransC . join . lift . eff . handle (pure ()) (pure . (runTransC =<<))
98-
9990
runControlIO :: (forall x . m x -> IO x) -> ControlIOC m a -> m a
10091
runControlIO handler = runReader (Handler handler) . runControlIOC
10192

0 commit comments

Comments
 (0)