-
Notifications
You must be signed in to change notification settings - Fork 27
Remove partial instances #842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2525da4 to
3609462
Compare
3609462 to
7868396
Compare
c7858b6 to
10520e6
Compare
6eec886 to
a4f884c
Compare
24f9066 to
7a1091f
Compare
60d0690 to
4e47f25
Compare
| deriving Show | ||
|
|
||
| newtype SerialiseAsRawBytesError = SerialiseAsRawBytesError | ||
| -- TODO We can do better than use String to carry the error message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| L.RewardAccount | ||
| { L.raNetwork = L.Testnet | ||
| , L.raCredential = L.KeyHashObj "0b1b872f7953bccfc4245f3282b3363f3d19e9e001a5c41e307363d7" | ||
| , L.raCredential = mkCredential "keyHash-0b1b872f7953bccfc4245f3282b3363f3d19e9e001a5c41e307363d7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you say a bit more about this change in the PR description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
| class (HasTypeProxy a, SerialiseAsRawBytes a) => SerialiseAsBech32 a where | ||
| -- | The human readable prefix to use when encoding this value to Bech32. | ||
| bech32PrefixFor :: a -> Text | ||
| bech32PrefixFor :: a -> Bech32.HumanReadablePart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be sure to include this breaking change in the PR description so it is obvious when generating the change logs in the next release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included in the changelog entry.
| filepath, | ||
| hedgehog >=1.1, | ||
| hedgehog-extras ^>=0.7, | ||
| microlens, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@palas at some point in the future we should do an audit of our dependencies in order to reduce the size of our wasm library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is microlens problematic here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the note of putting cardano-api on a diet - we have both parsec and attoparsec in dependencies. I'm not sure if both are needed.
| error "castVerificationKey (DRep): byron and shelley key sizes do not match!" | ||
|
|
||
| -- | Parse hex representation of any 'Hash' | ||
| parseHexHash :: P.Parser (Hash PaymentKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parseHexPaymentKeyHash? Many different things can be hex encoded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, I meant to write parseHexHash :: SerialiseAsRawBytes (Hash a) => P.Parser (Hash a). Thanks for spotting that.
| ] | ||
| parseRawBytesHex | ||
| where | ||
| -- ADDRHASH = Blake2b_224 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
4e47f25 to
7f550f7
Compare
7f550f7 to
68505ed
Compare
Changelog
Context
IsStringinstances generated fromUsingRawBytesHexwere partial and could fail with runtime exception leading to hard to track errors. We were usingfromStringon types using those instances incardano-cliandcardano-testnetalready. This PR removes those and addsparsecparsers instead.Because
IsStringwas used in tests, it's replaced by specialised functions in tests only for example:ledger's
parseCredentialChecklist