HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulerelude-1.2.2.2Haskell2010

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 liftIO calls explicitly. However, you still can use all these functions inside plain IO monad as usual.

Example
base

With the base function, you can easily work with these functions in the IO monad:

main :: IO ()
main = do
    x <- getLine
    print x

However, to work in MonadIO you already need to "lift" them:

main :: MonadIO m => m ()
main = do
    x <- liftIO getLine
    liftIO (print x)
relude

In the meantime, relude provides these function that can work in IO the same way:

main :: IO ()
main = do
    x <- getLine
    print x

But also allows you to work in the MonadIO monads more easily:

main :: MonadIO m => m ()
main = do
    x <- getLine
    print x
    • Packagerelude-1.2.2.2
    • Exports0
    • LanguageHaskell2010
    • LicenceMIT
    • SourceLifted.hs

    Lifted MVar and STM functions.

    Lifted reexports from Data.IORef module.

    Lifted versions of functions that work with exit processes.

    Lifted versions of functions working with files and common IO.

    Lifted functions to work with stdin and stdout.

    Lifted functions to work with IO Handles.

    Lifted functions to work with system environment.