cardano-ledger
cardano-ledger copied to clipboard
Ts sharing coders
Extends the Coders library to handle Sharing on the decode side. Adds some DecShareCBOR instances as described in issue #3486 using the new tools
Began to address the problems described in issue #4192, about serializing CompactForm MultiAsset, without affecting backward compatibility.
A large part of the changes have to do with the following changes
- replacing Ann with Pure
- replacing (<!*) with (<!>)
The original operators Ann and (<!*) had to do the the Annotator type, but the ones have been generalized to work with any Applicative functor. Including the monad (StateT (Share b) (Decoder s) b) which is the basis for Sharing.
Checklist
- [x] Commit sequence broadly makes sense and commits have useful messages
- [ ] New tests are added if needed and existing tests are updated
- [ ] When applicable, versions are updated in
.cabalandCHANGELOG.mdfiles according to the versioning process. - [ ] The version bounds in
.cabalfiles for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md) - [ ] All visible changes are prepended to the latest section of a
CHANGELOG.mdfor the affected packages. New section is never added with the code changes. (See RELEASING.md) - [x] Code is formatted with
fourmolu(usescripts/fourmolize.sh) - [x] Cabal files are formatted (use
scripts/cabal-format.sh) - [x]
hie.yamlhas been updated (usescripts/gen-hie.sh) - [ ] Self-reviewed the diff