Modulerelude-1.2.0.0Haskell2010
Relude.Lifted
SPDX-License-Identifier : MIT Maintainer : Kowainik xrom.xkov@gmail.com Stability : Stable Portability : Portable
Lifted versions of base functions.
These functions are lifted in a sense that you can use them inside various
monad transformers without adding Relude.liftIO calls explicitly. However, you still
can use all these functions inside plain Relude.IO monad as usual.
Example
base
With the base function, you can easily work with these functions in the
Relude.IO monad:
main :: Relude.IO ()
main = do
x <- getLine
print x
However, to work in Relude.MonadIO you already need to "lift" them:
main :: Relude.MonadIO m => m ()
main = do
x <- Relude.liftIO getLine
Relude.liftIO (print x)
relude
In the meantime, relude provides these function that can work in Relude.IO
the same way:
main :: Relude.IO ()
main = do
x <- getLine
print x
But also allows you to work in the Relude.MonadIO monads more easily:
main :: Relude.MonadIO m => m ()
main = do
x <- getLine
print x
- Packagerelude-1.2.0.0
- Exports0
- LanguageHaskell2010
- LicenceMIT
- SourceLifted.hs
module Relude.Lifted.Concurrent
module Relude.Lifted.IORef
Lifted reexports from Data.IORef module.
module Relude.Lifted.Exit
Lifted versions of functions that work with exit processes.
module Relude.Lifted.File
Lifted versions of functions working with files and common Relude.IO.
module Relude.Lifted.Terminal
Lifted functions to work with stdin and stdout.
module Relude.Lifted.Handle
module Relude.Lifted.Env
Lifted functions to work with system environment.