Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 2305

ghc-7.4.2-4.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>GHC.IO.Encoding.Failure</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_GHC-IO-Encoding-Failure.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">base-4.5.1.0: Basic libraries</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>internal</td></tr><tr><th>Maintainer</th><td>libraries@haskell.org</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">GHC.IO.Encoding.Failure</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Types for specifying how text encoding/decoding fails
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span>  <a href="#t:CodingFailureMode">CodingFailureMode</a> <ul class="subs"><li>= <a href="#v:ErrorOnCodingFailure">ErrorOnCodingFailure</a>  </li><li>| <a href="#v:IgnoreCodingFailure">IgnoreCodingFailure</a>  </li><li>| <a href="#v:TransliterateCodingFailure">TransliterateCodingFailure</a>  </li><li>| <a href="#v:RoundtripFailure">RoundtripFailure</a>  </li></ul></li><li class="src short"><a href="#v:codingFailureModeSuffix">codingFailureModeSuffix</a> :: <a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a> -&gt; <a href="Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:isSurrogate">isSurrogate</a> :: <a href="Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:recoverDecode">recoverDecode</a> :: <a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a> -&gt; <a href="System-IO.html#t:IO">IO</a> (<a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a>, <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a>)</li><li class="src short"><a href="#v:recoverEncode">recoverEncode</a> :: <a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a> -&gt; <a href="System-IO.html#t:IO">IO</a> (<a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a>, <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a>)</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:CodingFailureMode" class="def">CodingFailureMode</a>  </p><div class="doc"><p>The <code><a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a></code> is used to construct <code>TextEncoding</code>s, and
 specifies how they handle illegal sequences.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ErrorOnCodingFailure" class="def">ErrorOnCodingFailure</a></td><td class="doc"><p>Throw an error when an illegal sequence is encountered
</p></td></tr><tr><td class="src"><a name="v:IgnoreCodingFailure" class="def">IgnoreCodingFailure</a></td><td class="doc"><p>Attempt to ignore and recover if an illegal sequence is
 encountered
</p></td></tr><tr><td class="src"><a name="v:TransliterateCodingFailure" class="def">TransliterateCodingFailure</a></td><td class="doc"><p>Replace with the closest visual match upon an illegal
 sequence
</p></td></tr><tr><td class="src"><a name="v:RoundtripFailure" class="def">RoundtripFailure</a></td><td class="doc"><p>Use the private-use escape mechanism to attempt to allow
 illegal sequences to be roundtripped.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:CodingFailureMode" class="caption collapser" onclick="toggleSection('i:CodingFailureMode')">Instances</p><div id="section.i:CodingFailureMode" class="show"><table><tr><td class="src"><a href="Text-Show.html#t:Show">Show</a> <a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:codingFailureModeSuffix" class="def">codingFailureModeSuffix</a> :: <a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a> -&gt; <a href="Data-String.html#t:String">String</a></p></div><div class="top"><p class="src"><a name="v:isSurrogate" class="def">isSurrogate</a> :: <a href="Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Some characters are actually <a href="surrogate.html">surrogate</a> codepoints defined for
 use in UTF-16. We need to signal an invalid character if we detect
 them when encoding a sequence of <code><a href="Data-Char.html#t:Char">Char</a></code>s into <code><a href="Data-Word.html#t:Word8">Word8</a></code>s because they
 won't give valid Unicode.
</p><p>We may also need to signal an invalid character if we detect them
 when encoding a sequence of <code><a href="Data-Char.html#t:Char">Char</a></code>s into <code><a href="Data-Word.html#t:Word8">Word8</a></code>s because the
 <code><a href="GHC-IO-Encoding-Failure.html#v:RoundtripFailure">RoundtripFailure</a></code> mode creates these to round-trip bytes through
 our internal UTF-16 encoding.
</p></div></div><div class="top"><p class="src"><a name="v:recoverDecode" class="def">recoverDecode</a> :: <a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a> -&gt; <a href="System-IO.html#t:IO">IO</a> (<a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a>, <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a>)</p></div><div class="top"><p class="src"><a name="v:recoverEncode" class="def">recoverEncode</a> :: <a href="GHC-IO-Encoding-Failure.html#t:CodingFailureMode">CodingFailureMode</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a> -&gt; <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a> -&gt; <a href="System-IO.html#t:IO">IO</a> (<a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Char.html#t:Char">Char</a>, <a href="GHC-IO-Buffer.html#t:Buffer">Buffer</a> <a href="Data-Word.html#t:Word8">Word8</a>)</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>