Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c26795bf2cadf2405b1f961ea9bc2ba2 > files > 22

haskell-utf8-string-0.3.3-1mdv2009.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Codec.Binary.UTF8.Generic</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Codec-Binary-UTF8-Generic.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>utf8-string-0.3.3: Support for reading and writing UTF8 Strings</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Codec.Binary.UTF8.Generic</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>This module provides fast, validated encoding and decoding functions
   between ByteStrings and <TT
>String</TT
>s. It does not exactly match the
   output of the Codec.Binary.UTF8.String output for invalid encodings
   as the number of replacement characters is sometimes longer.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
> (Num s, Ord s) =&gt; <A HREF="#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s | b -&gt; s <SPAN CLASS="keyword"
>where</SPAN
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3Absplit"
>bsplit</A
> :: s -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Abdrop"
>bdrop</A
> :: s -&gt; b -&gt; b</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Abuncons"
>buncons</A
> :: b -&gt; Maybe (Word8, b)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AelemIndex"
>elemIndex</A
> :: Word8 -&gt; b -&gt; Maybe s</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aempty"
>empty</A
> :: b</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anull"
>null</A
> :: b -&gt; Bool</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Apack"
>pack</A
> :: [Word8] -&gt; b</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Atail"
>tail</A
> :: b -&gt; b</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adecode"
>decode</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; Maybe (Char, s)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Areplacement_char"
>replacement_char</A
> :: Char</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Auncons"
>uncons</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; Maybe (Char, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsplitAt"
>splitAt</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; s -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Atake"
>take</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; s -&gt; b -&gt; b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adrop"
>drop</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; s -&gt; b -&gt; b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aspan"
>span</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (Char -&gt; Bool) -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Abreak"
>break</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (Char -&gt; Bool) -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfromString"
>fromString</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; String -&gt; b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtoString"
>toString</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; String</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afoldl"
>foldl</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (a -&gt; Char -&gt; a) -&gt; a -&gt; b -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afoldr"
>foldr</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (Char -&gt; a -&gt; a) -&gt; a -&gt; b -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Alength"
>length</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; s</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Alines"
>lines</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; [b]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Alines%27"
>lines'</A
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; [b]</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
> (Num s, Ord s) =&gt; <A NAME="t%3AUTF8Bytes"
></A
><B
>UTF8Bytes</B
> b s | b -&gt; s <SPAN CLASS="keyword"
>where</SPAN
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
>Methods</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A NAME="v%3Absplit"
></A
><B
>bsplit</B
> :: s -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Abdrop"
></A
><B
>bdrop</B
> :: s -&gt; b -&gt; b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Abuncons"
></A
><B
>buncons</B
> :: b -&gt; Maybe (Word8, b)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AelemIndex"
></A
><B
>elemIndex</B
> :: Word8 -&gt; b -&gt; Maybe s</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aempty"
></A
><B
>empty</B
> :: b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Anull"
></A
><B
>null</B
> :: b -&gt; Bool</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Apack"
></A
><B
>pack</B
> :: [Word8] -&gt; b</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Atail"
></A
><B
>tail</B
> :: b -&gt; b</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:UTF8Bytes')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:UTF8Bytes" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int64</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int64</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ([] Word8) Int</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ([] Word8) Int</TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Adecode"
></A
><B
>decode</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; Maybe (Char, s)</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Areplacement_char"
></A
><B
>replacement_char</B
> :: Char</TD
></TR
><TR
><TD CLASS="doc"
>This character is used to mark errors in a UTF8 encoded string.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Auncons"
></A
><B
>uncons</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; Maybe (Char, b)</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AsplitAt"
></A
><B
>splitAt</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; s -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Atake"
></A
><B
>take</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; s -&gt; b -&gt; b</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Adrop"
></A
><B
>drop</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; s -&gt; b -&gt; b</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aspan"
></A
><B
>span</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (Char -&gt; Bool) -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Abreak"
></A
><B
>break</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (Char -&gt; Bool) -&gt; b -&gt; (b, b)</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AfromString"
></A
><B
>fromString</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; String -&gt; b</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AtoString"
></A
><B
>toString</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; String</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Afoldl"
></A
><B
>foldl</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (a -&gt; Char -&gt; a) -&gt; a -&gt; b -&gt; a</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Afoldr"
></A
><B
>foldr</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; (Char -&gt; a -&gt; a) -&gt; a -&gt; b -&gt; a</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Alength"
></A
><B
>length</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; s</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Alines"
></A
><B
>lines</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; [b]</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Alines%27"
></A
><B
>lines'</B
> :: <A HREF="Codec-Binary-UTF8-Generic.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s =&gt; b -&gt; [b]</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.1</TD
></TR
></TABLE
></BODY
></HTML
>