title: Convert a Lazy ByteString to a strict ByteString
body: <p>I have a function that takes a <a href="http://hackage.haskell.org/packages/archive/bytestring/latest/doc/html/Data-ByteString-Lazy.html#v:all" rel="noreferrer">lazy <code>ByteString</code></a>, that I wish to have return lists of <a href="http://hackage.haskell.org/packages/archive/bytestring/latest/doc/html/Data-ByteString.html#v:all" rel="noreferrer">strict <code>ByteStrings</code></a> (the laziness should be transferred to the list type of the output).</p>
  
  <pre><code>import qualified Data.ByteString as B
  import qualified Data.ByteString.Lazy as L
  csVals :: L.ByteString -&gt; [B.ByteString]
  </code></pre>
  
  <p>I want to do this for various reasons, <a href="http://hackage.haskell.org/packages/archive/bytestring-lexing/0.1.2/doc/html/Data-ByteString-Lex-Double.html" rel="noreferrer">several lexing functions</a> require strict <code>ByteString</code>s, and I can guarantee the outputted strict <code>ByteString</code>s in the output of <code>csVal</code>s above are very small.</p>
  
  <p><strong>How do I go about "strictifying" <code>ByteString</code>s without <a href="http://hackage.haskell.org/packages/archive/bytestring/latest/doc/html/Data-ByteString-Lazy.html#v:toChunks" rel="noreferrer">chunking</a> them?</strong></p>
  
  <h2>Update0</h2>
  
  <p>I want to take a Lazy <code>ByteString</code>, and make one strict <code>ByteString</code> containing all its data.</p>