]> gitweb.michael.orlitzky.com - hath.git/commitdiff
Use the derived instance for Ord and add a test case.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 14 Apr 2017 04:00:17 +0000 (00:00 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 14 Apr 2017 04:00:17 +0000 (00:00 -0400)
There was a bug in my implementation of Ord for Octets that was
pointed out by Michael McKibben. As a result, the octets corresponding
to (for example) 2 and 4 would compare incorrectly. This is fixed by
simply adopting the derived Ord instance for Octets. Why didn't I do
that in the first place?

With the bug fixed, I've added a QuickCheck property to ensure that
the Ord instances for Octet and Int agree when the Int is between 0
and 255.


No differences found