<div class="gmail_quote">On Wed, Sep 8, 2010 at 11:43 AM, Edward Kmett <span dir="ltr">&lt;<a href="mailto:ekmett@gmail.com">ekmett@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br></div>I want to like and use Data.Text, but I haven&#39;t been able to. Too many of the operations devolve to O(n) that could be O(1) if I had some way to slice based on cursors into the data type, and the current API locks me out of the internals, so I can&#39;t write those functions myself.</blockquote>
<div><br></div><div>What kinds of functions are you thinking about? The Text type <i>is</i> the cursor into the underlying array. What specific operations do you want to perform that you&#39;d prefer to be O(1)?</div><div>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">But really the last nail in the coffin for me, is that often I want to be able to just mmap data in from disk and use it, and rarely is my data on disk stored in UTF-16.<br>
</blockquote><div><br></div><div>Yep, the text library just isn&#39;t intended for that right now.</div></div>