{-# LANGUAGE CPP #-}
module Colourista.Short
( b
, i
, u
) where
import Data.ByteString (ByteString)
#if __GLASGOW_HASKELL__ < 804
import Data.Semigroup (Semigroup)
#endif
import Data.String (IsString)
import Data.Text (Text)
import Colourista.Pure (bold, formatWith, italic, underline)
b :: (IsString str, Semigroup str) => str -> str
b = formatWith [bold]
{-# SPECIALIZE b :: String -> String #-}
{-# SPECIALIZE b :: Text -> Text #-}
{-# SPECIALIZE b :: ByteString -> ByteString #-}
i :: (IsString str, Semigroup str) => str -> str
i = formatWith [italic]
{-# SPECIALIZE i :: String -> String #-}
{-# SPECIALIZE i :: Text -> Text #-}
{-# SPECIALIZE i :: ByteString -> ByteString #-}
u :: (IsString str, Semigroup str) => str -> str
u = formatWith [underline]
{-# SPECIALIZE u :: String -> String #-}
{-# SPECIALIZE u :: Text -> Text #-}
{-# SPECIALIZE u :: ByteString -> ByteString #-}