module Data.ByteString.UTF8.Normalize
{-# DEPRECATED "Convert ByteString to Text and then normalize" #-}
(
NormalizationMode(..)
, normalize
) where
import Data.ByteString (ByteString)
import Data.Text.Encoding (decodeUtf8, encodeUtf8)
import Data.Unicode.Types (NormalizationMode(..))
import qualified Data.Text.Normalize as T
normalize :: NormalizationMode -> ByteString -> ByteString
normalize :: NormalizationMode -> ByteString -> ByteString
normalize NormalizationMode
mode = (Text -> ByteString
encodeUtf8 (Text -> ByteString)
-> (ByteString -> Text) -> ByteString -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NormalizationMode -> Text -> Text
T.normalize NormalizationMode
mode (Text -> Text) -> (ByteString -> Text) -> ByteString -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Text
decodeUtf8)