Re: System.IO but not with Data.String?
Hilco Wijbenga <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cafe |
|---|---|
| Message-ID | <CAE1pOi2r_v3SK-g4awAebVk3j2E4HK2eDuSBMDCSL84kviyW2Q@mail.gmail.com> |
Yes, thank you. I was aware of that but AFAICT, it still uses FilePath (i.e. String) and _that_ is what I want to avoid. On Thu, May 9, 2024 at 6:33 PM Brent Yorgey <[email protected]> wrote: > > There is also e.g. the Data.Text.IO module from the text package, for doing file I/O and other such things with Text instead of String. > > -Brent > > > On Thu, May 9, 2024 at 2:29 PM Hilco Wijbenga <[email protected]> wrote: >> >> Hi all, >> >> We have Text and ByteString as alternatives to String but as soon as >> you want to do anything IO related (read a file, get a directory's >> content, et cetera) it seems your only option is to use String. >> >> For an occasional IO action, this is obviously irrelevant but for a >> compiler, a build system, or anything else that does a lot of IO this >> seems like it would be(come) an issue. So I was wondering what would >> be involved in adding (portable) support for System.IO with an >> alternative to String (this alternative does not necessarily need to >> be Text or ByteString). >> >> I did a little bit of research into how GHC handles this and there >> appear to be several other String types in the GHC tree, including >> ByteString(?). How feasible is an alternative System.IO API? How tied >> to GHC would such an alternative need to be? To be clear, I am not >> looking to _replace_ System.IO but to _add_ an alternative API (and >> not a wrapper that maps to/from String). >> >> Please do not assume I necessarily know what I am talking about! >> Especially, when it comes to the "portable" part. :-) >> >> Cheers, >> Hilco >> _______________________________________________ >> Haskell-Cafe mailing list >> To (un)subscribe, modify options or view archives go to: >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> Only members subscribed via the mailman list are allowed to post. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.