Haskell encoder/decoder for CBOR encoding.