-{-# OPTIONS_GHC -fno-implicit-prelude -funbox-strict-fields #-}
+{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Encoding.Types
import GHC.Base
import GHC.Word
-import GHC.IO
+import GHC.Show
+-- import GHC.IO
import GHC.IO.Buffer
-- -----------------------------------------------------------------------------
-- of bytes. The 'TextEncoding' for UTF-8 is 'utf8'.
data TextEncoding
= forall dstate estate . TextEncoding {
+ textEncodingName :: String,
+ -- ^ a string that can be passed to 'mkTextEncoding' to
+ -- create an equivalent 'TextEncoding'.
mkTextDecoder :: IO (TextDecoder dstate),
mkTextEncoder :: IO (TextEncoder estate)
}
+
+instance Show TextEncoding where
+ -- | Returns the value of 'textEncodingName'
+ show te = textEncodingName te