module Effectful.Console.ByteString.Lazy
(
Console
, runConsole
, getContents
, putStr
, putStrLn
, interact
) where
import Prelude hiding
( getContents
, interact
, putStr
, putStrLn
)
import Data.ByteString.Lazy (ByteString)
import Data.ByteString.Lazy.Char8 qualified as LBS8
import Effectful
import Effectful.Console.Effect
import Effectful.Dispatch.Static
getContents :: Console :> es => Eff es ByteString
getContents :: forall (es :: [Effect]). (Console :> es) => Eff es ByteString
getContents = IO ByteString -> Eff es ByteString
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ IO ByteString
LBS8.getContents
putStr :: Console :> es => ByteString -> Eff es ()
putStr :: forall (es :: [Effect]). (Console :> es) => ByteString -> Eff es ()
putStr = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ())
-> (ByteString -> IO ()) -> ByteString -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> IO ()
LBS8.putStr
putStrLn :: Console :> es => ByteString -> Eff es ()
putStrLn :: forall (es :: [Effect]). (Console :> es) => ByteString -> Eff es ()
putStrLn = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ())
-> (ByteString -> IO ()) -> ByteString -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> IO ()
LBS8.putStrLn
interact :: Console :> es => (ByteString -> ByteString) -> Eff es ()
interact :: forall (es :: [Effect]).
(Console :> es) =>
(ByteString -> ByteString) -> Eff es ()
interact = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ())
-> ((ByteString -> ByteString) -> IO ())
-> (ByteString -> ByteString)
-> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ByteString -> ByteString) -> IO ()
LBS8.interact