diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-09-13 15:44:59 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-09-13 15:44:59 +0000 |
commit | c3563c6726352c3285860c6e79b507d6395947e2 (patch) | |
tree | 988ccd84e93dd5c4c0207847106bbddaa6a757cb /libraries/base/GHC/IO/Encoding/UTF32.hs | |
parent | 19570272aaee34867914caa4db5bab49f308a703 (diff) | |
download | haskell-c3563c6726352c3285860c6e79b507d6395947e2.tar.gz |
Add a suitable Show instance for TextEncoding (#4273)
Diffstat (limited to 'libraries/base/GHC/IO/Encoding/UTF32.hs')
-rw-r--r-- | libraries/base/GHC/IO/Encoding/UTF32.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libraries/base/GHC/IO/Encoding/UTF32.hs b/libraries/base/GHC/IO/Encoding/UTF32.hs index e384abda12..685bdaff83 100644 --- a/libraries/base/GHC/IO/Encoding/UTF32.hs +++ b/libraries/base/GHC/IO/Encoding/UTF32.hs @@ -48,7 +48,8 @@ import GHC.IORef -- The UTF-32 codec: either UTF-32BE or UTF-32LE with a BOM utf32 :: TextEncoding -utf32 = TextEncoding { mkTextDecoder = utf32_DF, +utf32 = TextEncoding { textEncodingName = "UTF-32", + mkTextDecoder = utf32_DF, mkTextEncoder = utf32_EF } utf32_DF :: IO (TextDecoder (Maybe DecodeBuffer)) @@ -130,7 +131,8 @@ utf32_native_encode = utf32be_encode -- UTF32LE and UTF32BE utf32be :: TextEncoding -utf32be = TextEncoding { mkTextDecoder = utf32be_DF, +utf32be = TextEncoding { textEncodingName = "UTF-32BE", + mkTextDecoder = utf32be_DF, mkTextEncoder = utf32be_EF } utf32be_DF :: IO (TextDecoder ()) @@ -153,7 +155,8 @@ utf32be_EF = utf32le :: TextEncoding -utf32le = TextEncoding { mkTextDecoder = utf32le_DF, +utf32le = TextEncoding { textEncodingName = "UTF-32LE", + mkTextDecoder = utf32le_DF, mkTextEncoder = utf32le_EF } utf32le_DF :: IO (TextDecoder ()) |