well-typed / cborg

Binary serialisation in the CBOR format
https://hackage.haskell.org/package/cborg
191 stars 86 forks source link

Fix a `SomeTypeRep` tagging issue #212

Closed deepfire closed 5 years ago

deepfire commented 5 years ago

The demonstrator test fails:

type: SomeTypeRep
        cbor roundtrip:                       FAIL
          *** Failed! Exception: 'DeserialiseFailure 2 "Codec.CBOR.Class.decodeSomeTypeRep: unexpected tag\n"' (after 1 test):
          [Either (Maybe Int) (Proxy (Kind *) ('Type * [Char]))]
          Use --quickcheck-replay=754269 to reproduce.
        flat roundtrip:                       FAIL
          *** Failed! Falsified (after 1 test):
          [Either (Maybe Int) (Proxy (Kind *) ('Type * [Char]))]
          Use --quickcheck-replay=127810 to reproduce.
        flat term is valid:                   OK
          +++ OK, passed 100 tests.
deepfire commented 5 years ago

It would probably be best to just squash these commits into one commit, I think. (That way things like git bisect still work, and the tests aren't in a half functional state at one point.)

@thoughtpolice, done.

deepfire commented 5 years ago

cc @thoughtpolice @dcoutts