{-# LANGUAGE ConstraintKinds #-}
module RIO.Prelude.Renames
  ( sappend
  , LByteString
  , LText
  , UVector
  , SVector
  , GVector
  , toStrictBytes
  , fromStrictBytes
  , yieldThread
  ) where

import Prelude
import qualified Data.ByteString          as B
import qualified Data.ByteString.Lazy     as BL
import qualified Data.Vector.Generic      as GVector
import qualified Data.Vector.Storable     as SVector
import qualified Data.Vector.Unboxed      as UVector
import qualified Data.Text.Lazy           as TL
import qualified Data.Semigroup
import UnliftIO (MonadIO)
import qualified UnliftIO.Concurrent (yield)

sappend :: Data.Semigroup.Semigroup s => s -> s -> s
sappend :: s -> s -> s
sappend = s -> s -> s
forall a. Semigroup a => a -> a -> a
(Data.Semigroup.<>)

type UVector = UVector.Vector
type SVector = SVector.Vector
type GVector = GVector.Vector

type LByteString = BL.ByteString
type LText = TL.Text

toStrictBytes :: LByteString -> B.ByteString
toStrictBytes :: LByteString -> ByteString
toStrictBytes = LByteString -> ByteString
BL.toStrict

fromStrictBytes :: B.ByteString -> LByteString
fromStrictBytes :: ByteString -> LByteString
fromStrictBytes = ByteString -> LByteString
BL.fromStrict

yieldThread :: MonadIO m => m ()
yieldThread :: m ()
yieldThread = m ()
forall (m :: * -> *). MonadIO m => m ()
UnliftIO.Concurrent.yield
{-# INLINE yieldThread #-}