blob: d384e73e6337a5cbea082928b45bc3f6f3c4a1cc (
plain) (
tree)
|
|
module Lib (printValue) where
import Control.Monad (void)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Except (ExceptT, runExceptT)
getValue :: Monad m => ExceptT e m Int
getValue = pure 42
printValue :: IO ()
printValue = void $ runExceptT $ do
value <- getValue
lift $ print value
|