
Thanks Li-yao . As I mentioned in my answer to Viktor, I am now using the ByteString functions except when I want to parse Char8's, for example to parse an 'a' with Data.Attoparsec.ByteString.Char8.char 'a'. Regards, Pedro Borges El 17/2/2023 a las 3:12 p. m., Li-yao Xia escribió:
You should probably use `Data.Attoparsec.ByteString`. Both let you do the same thing, but `Char8` just uses the wrong type (Chars ['\0'..'\255'] to represent bytes, i.e. Word8).
On 2023-02-17 5:32 PM, Pedro B. wrote:
Dear Listers,
I am developing a program to parse dif output taken from stdin (as in diff file1 file2 | myApp) or from a file. I am reading the input as ByteString in either case and I am parsing it Attoparsec. My question is, Should I use Data.Attoparsec.ByteString.Char8 or Data.Attoparsec.ByteString?
So far, I've been using Data.Attoparsec.ByteString.Char8 and it works for my sample files, which are in utf8 or, latin1, or the default Windows encoding.
What do you suggest?
Note: I sent this question previously to the beginners list, but someone suggested to me privately to send it to this list. Regards,
Pedro Borges _______________________________________________ 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.