<div dir="ltr"><div>There is also e.g. the <a href="http://Data.Text.IO">Data.Text.IO</a> module from the text package, for doing file I/O and other such things with Text instead of String.</div><div><br></div><div>-Brent<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 9, 2024 at 2:29 PM Hilco Wijbenga <<a href="mailto:hilco.wijbenga@gmail.com">hilco.wijbenga@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
We have Text and ByteString as alternatives to String but as soon as<br>
you want to do anything IO related (read a file, get a directory's<br>
content, et cetera) it seems your only option is to use String.<br>
<br>
For an occasional IO action, this is obviously irrelevant but for a<br>
compiler, a build system, or anything else that does a lot of IO this<br>
seems like it would be(come) an issue. So I was wondering what would<br>
be involved in adding (portable) support for System.IO with an<br>
alternative to String (this alternative does not necessarily need to<br>
be Text or ByteString).<br>
<br>
I did a little bit of research into how GHC handles this and there<br>
appear to be several other String types in the GHC tree, including<br>
ByteString(?). How feasible is an alternative System.IO API? How tied<br>
to GHC would such an alternative need to be? To be clear, I am not<br>
looking to _replace_ System.IO but to _add_ an alternative API (and<br>
not a wrapper that maps to/from String).<br>
<br>
Please do not assume I necessarily know what I am talking about!<br>
Especially, when it comes to the "portable" part. :-)<br>
<br>
Cheers,<br>
Hilco<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>