@@ -68,7 +68,7 @@ import qualified Data.ByteString.Internal as BI
6868import qualified Data.ByteString.Lazy as BL
6969import qualified Data.ByteString.Unsafe as BU
7070import Data.Text (Text)
71−import qualified Data.Text as T
71+import qualified Data.Text.Encoding as T
7272
7373import Data.UUID.Types.Internal.Builder
7474
@@ -351,11 +351,11 @@ toString uuid = hexw w0 $ hexw' w1 $ hexw' w2 $ hexw w3 ""
351351-- | If the passed in `Text` can be parsed as an ASCII representation of
352352-- a `UUID`, it will be. The hyphens may not be omitted.
353353fromText :: Text -> Maybe UUID
354−fromText = fromString . T.unpack
354+fromText = fromASCIIBytes . T.encodeUtf8
355355
356356-- | Convert a UUID into a hyphentated string using lower-case letters.
357357toText :: UUID -> Text
358−toText = T.pack . toString
358+toText = T.decodeLatin1 . toASCIIBytes
359359
360360-- | Convert a UUID into a hyphentated string using lower-case letters, packed
361361-- as ASCII bytes into `B.ByteString`.