-
Notifications
You must be signed in to change notification settings - Fork 272
/
Data-ByteString-Lens.html
13 lines (13 loc) · 10.1 KB
/
Data-ByteString-Lens.html
1
2
3
4
5
6
7
8
9
10
11
12
13
<!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>Data.ByteString.Lens</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_Data-ByteString-Lens.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-ByteString-Lens.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">lens-2.8: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>Edward Kmett <ekmett@gmail.com></td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.ByteString.Lens</p></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </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">class</span> <a href="#t:IsByteString">IsByteString</a> t <span class="keyword">where</span><ul class="subs"><li><a href="#v:packedBytes">packedBytes</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> [<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Word.html#t:Word8">Word8</a>] t</li><li><a href="#v:packedChars">packedChars</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> t</li><li><a href="#v:bytes">bytes</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> t <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Word.html#t:Word8">Word8</a></li><li><a href="#v:chars">chars</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> t <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Char.html#t:Char">Char</a></li></ul></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:IsByteString" class="def">IsByteString</a> t <span class="keyword">where</span><a href="src/Data-ByteString-Lens.html#IsByteString" class="link">Source</a></p><div class="doc"><p>Traversals for ByteStrings.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:packedBytes" class="def">packedBytes</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> [<a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Word.html#t:Word8">Word8</a>] t<a href="src/Data-ByteString-Lens.html#packedBytes" class="link">Source</a></p><div class="doc"><p><code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:pack">pack</a></code> (or <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:unpack">unpack</a></code>) a list of bytes into a strict or lazy <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code>
</p><pre><code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:pack">pack</a></code> x = x <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Data-ByteString-Lens.html#v:packedBytes">packedBytes</a></code></pre><pre><code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:unpack">unpack</a></code> x = x <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Control-Lens-Isomorphic.html#v:from">from</a></code> <code><a href="Data-ByteString-Lens.html#v:packedBytes">packedBytes</a></code></pre></div><p class="src"><a name="v:packedChars" class="def">packedChars</a> :: <a href="Control-Lens-Type.html#t:Simple">Simple</a> <a href="Control-Lens-Iso.html#t:Iso">Iso</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-String.html#t:String">String</a> t<a href="src/Data-ByteString-Lens.html#packedChars" class="link">Source</a></p><div class="doc"><p><code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString-Char8.html#t:pack">pack</a></code> (or <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString-Char8.html#t:unpack">unpack</a></code>) a list of characters into a strict or lazy <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code>
</p><p>When writing back to the <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code> it is assumed that every <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Char.html#t:Char">Char</a></code>
lies between '\x00' and '\xff'.
</p><pre><code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString-Char8.html#t:pack">pack</a></code> x = x <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Data-ByteString-Lens.html#v:packedChars">packedChars</a></code></pre><pre><code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString-Char8.html#t:unpack">unpack</a></code> x = x <code><a href="Control-Lens-Getter.html#v:-94-.">^.</a></code> <code><a href="Control-Lens-Isomorphic.html#v:from">from</a></code> <code><a href="Data-ByteString-Lens.html#v:packedChars">packedChars</a></code></pre></div><p class="src"><a name="v:bytes" class="def">bytes</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> t <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Word.html#t:Word8">Word8</a><a href="src/Data-ByteString-Lens.html#bytes" class="link">Source</a></p><div class="doc"><p>Traverse each <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Word.html#t:Word8">Word8</a></code> in a strict or lazy <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code>
</p><pre><code><a href="Data-ByteString-Lens.html#v:bytes">bytes</a></code> = <code><a href="Control-Lens-Isomorphic.html#v:from">from</a></code> <code><a href="Data-ByteString-Lens.html#v:packedBytes">packedBytes</a></code> <code><a href="Control-Lens-Indexed.html#v:.-62-">.></a></code> <code>traverseList</code></pre><pre><code><a href="Control-Lens-Fold.html#v:anyOf">anyOf</a></code> <code><a href="Data-ByteString-Lens.html#v:bytes">bytes</a></code> (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#v:-61--61-">==</a></code> 0x80) :: <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></code></pre></div><p class="src"><a name="v:chars" class="def">chars</a> :: <a href="Control-Lens-IndexedTraversal.html#t:SimpleIndexedTraversal">SimpleIndexedTraversal</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Int.html#t:Int">Int</a> t <a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Char.html#t:Char">Char</a><a href="src/Data-ByteString-Lens.html#chars" class="link">Source</a></p><div class="doc"><p>Traverse the individual bytes in a strict or lazy <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code> as characters.
</p><p>When writing back to the <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code> it is assumed that every <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Char.html#t:Char">Char</a></code>
lies between '\x00' and '\xff'.
</p><pre><code><a href="Data-ByteString-Lens.html#v:chars">chars</a></code> = <code><a href="Control-Lens-Isomorphic.html#v:from">from</a></code> <code><a href="Data-ByteString-Lens.html#v:packedChars">packedChars</a></code> . <code><a href="Control-Lens-Traversal.html#v:traverse">traverse</a></code></pre><pre><code><a href="Control-Lens-Fold.html#v:anyOf">anyOf</a></code> <code><a href="Data-ByteString-Lens.html#v:chars">chars</a></code> (<code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Eq.html#v:-61--61-">==</a></code> 'c') :: <code><a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></code> -> <code><a href="/usr/share/doc/ghc/html/libraries/base-4.6.0.0/Data-Bool.html#t:Bool">Bool</a></code></pre></div></div><div class="subs instances"><p id="control.i:IsByteString" class="caption collapser" onclick="toggleSection('i:IsByteString')">Instances</p><div id="section.i:IsByteString" class="show"><table><tr><td class="src"><a href="Data-ByteString-Lens.html#t:IsByteString">IsByteString</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-ByteString-Lens.html#t:IsByteString">IsByteString</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.10.0.0/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.12.0</p></div></body></html>