Relude.Print

relude-1.2.2.0: Safe, performant, user-friendly and lightweight Haskell Standard Library

Copyright | (c) 2016 Stephen Diehl (c) 2016-2018 Serokell (c) 2018-2023 Kowainik
License | MIT
Maintainer | Kowainik <xrom.xkov@gmail.com>
Stability | Stable
Portability | Portable
Safe Haskell | Safe
Language | Haskell2010

Relude.Print

Contents

- `Text` & `LText`
- `ByteString` & `LByteString`

Description

Functions like `putStr` and `putStrLn` but for `Text`, `LText`, `ByteString` and `LByteString`.

Synopsis

- putText :: MonadIO m => Text -> m ()
- putTextLn :: MonadIO m => Text -> m ()
- putLText :: MonadIO m => LText -> m ()
- putLTextLn :: MonadIO m => LText -> m ()
- putBS :: MonadIO m => ByteString -> m ()
- putBSLn :: MonadIO m => ByteString -> m ()
- putLBS :: MonadIO m => LByteString -> m ()
- putLBSLn :: MonadIO m => LByteString -> m ()

# `Text` & `LText`

putText :: MonadIO m => Text -> m () #

Lifted version of `putStr`.

    >>> putText "Hello, world!"
    Hello, world!

putTextLn :: MonadIO m => Text -> m () #

Lifted version of `putStrLn`.

    >>> putTextLn "Hello, world!"
    Hello, world!

putLText :: MonadIO m => LText -> m () #

Lifted version of `putStr`.

    >>> putLText "Hello, world!"
    Hello, world!

putLTextLn :: MonadIO m => LText -> m () #

Lifted version of `putStrLn`.

    >>> putLTextLn "Hello, world!"
    Hello, world!

# `ByteString` & `LByteString`

putBS :: MonadIO m => ByteString -> m () #

Lifted version of `putStr`.

    >>> putBS ("Hello, world!" :: ByteString)
    Hello, world!

Since: 0.3.0

putBSLn :: MonadIO m => ByteString -> m () #

Lifted version of `putStrLn`.

    >>> putBSLn ("Hello, world!" :: ByteString)
    Hello, world!

Since: 0.3.0

putLBS :: MonadIO m => LByteString -> m () #

Lifted version of `putStr`.

    >>> putLBS ("Hello, world!" :: LByteString)
    Hello, world!

Since: 0.3.0

putLBSLn :: MonadIO m => LByteString -> m () #

Lifted version of `putStrLn`.

    >>> putLBSLn ("Hello, world!" :: LByteString)
    Hello, world!

Since: 0.3.0