HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

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.