Types in Data.Attoparsec.Char8 shouldn't be Word8, should they? #27

afcowie opened this Issue Nov 4, 2012 · 3 comments


None yet

3 participants

afcowie commented Nov 4, 2012

Data.Attoparsec.Char8 generally has predicates of the type (Char -> Bool), for example isSpace, and functions like takeTill and takeWhile take such predicates, having type (Char -> Bool) -> Parser ByteString.

Shouldn't the isEndOfLine and isHorizontalSpace predicate functions similarly be specialized to (Char -> Bool)? Right now they are (Word8 -> Bool) which make them difficult to use with takeTill.


bos commented Mar 28, 2015

It's more trouble to move them than to leave the situation as-is, alas.

@bos bos closed this Mar 28, 2015
liyang commented Mar 30, 2015

@bos Can we leave this ticket open? We have our own local Data.Attoparsec.Char8 that PackageImports the one from attoparsec and ‘fixes’ exactly this issue.

bos commented Mar 30, 2015

Well, the point of keeping a bug open is to indicate either that it hasn't been read or that a fix might happen some day. In this case, I've read it and provisionally decided that it's valid but not to fix it, so why keep it open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment