HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulerebase-1.21.2Haskell2010

Rebase.GHC.IO.Encoding.Failure

  • 1 type
  • 6 values
  • Packagerebase-1.21.2
  • Exports7
  • LanguageHaskell2010
  • LicenceMIT
  • SourceFailure.hs
datadata CodingFailureMode
#

The CodingFailureMode is used to construct System.IO.TextEncodings, and specifies how they handle illegal sequences.

Constructors

Instances1Show
valueisSurrogate :: Char -> Bool
#

Some characters are actually "surrogate" codepoints defined for use in UTF-16. We need to signal an invalid character if we detect them when encoding a sequence of Chars into Word8s because they won't give valid Unicode.

We may also need to signal an invalid character if we detect them when encoding a sequence of Chars into Word8s because the RoundtripFailure mode creates these to round-trip bytes through our internal UTF-16 encoding.