It looks as though the test compares two instances of Map. We haven't defined equality for Map (it's not a case class, and it doesn't have an equals method), so the test probably falls back to object equality.
Looking in the cats law code, the test that fails is:
private final class Map[A, B](f: A => B, pa: => Parser[A])
Since any instance of Eq would be eager, I don't think it's possible to define an instance for it.
Unfortunately, this means that law tests for the parser would be impossible to write. Apologies for not spotting this earlier!
There are many improvements that need to be made to the parser, for example investigating using cats-parse for it instead. Now that you're familiar with the code, would you be interested in looking into it?
@kxa14, this is the error I have on my end:
It looks as though the test compares two instances of
Map
. We haven't defined equality forMap
(it's not a case class, and it doesn't have anequals
method), so the test probably falls back to object equality.Looking in the cats law code, the test that fails is:
Now the problem is that the parser is lazy:
Since any instance of
Eq
would be eager, I don't think it's possible to define an instance for it.Unfortunately, this means that law tests for the parser would be impossible to write. Apologies for not spotting this earlier!
There are many improvements that need to be made to the parser, for example investigating using cats-parse for it instead. Now that you're familiar with the code, would you be interested in looking into it?