autodocodec
autodocodec copied to clipboard
Add HasCodec Const instance and fix HasCodec Identity instance
Ha! The one time I merge something without demanding tests, it breaks something. Serves me right.
The question now is whether I should try that again or demand tests this time.
Last time I hadn't because it required contributions to genvalidity
as well.
Haha yeah, maybe I should have had tests. It's a subtle bug the typechecker doesn't pick up.
You may want to destroy 0.2.0.4
I've been adding a few more instances also. Perhaps I should have held off with these PRs until I actually tested things to ensure they worked.
In the interest of fixing the bug asap, we can merge these without tests.
However, I want to do so only on the condition that we do add these tests later.
It does require adding some instances to genvalidity
here: https://github.com/NorfairKing/validity/blob/master/genvalidity/src/Data/GenValidity.hs
Does that sound acceptable?
Perhaps you should just do the fix for identity. In hindsight there's a heap of instances I want to add (which I've just pushed to this PR).
Perhaps keep this PR open and I'll add tests when I can and we can merge all these instances in one go.
@clintonmead Could you make a separate PR with the fix for identity? (and tests, ideally, they are in autodocodec-api-usage. Almost every Spec
file could have an Identity
test added)
Ping about these. A separate PR is not needed but tests definitely are.
EDIT: I just realised this will require a PR for https://github.com/NorfairKing/validity as well.
@clintonmead ping
@clintonmead ping.