-
Notifications
You must be signed in to change notification settings - Fork 41
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
Clear away psbFromBytes #291
Comments
Holy 💩
This is a very good suggestion! |
I have something of a personal usability stake in this, as a task I will have soon will be adding golden tests to ensure that the SECP256k1 serializations are behaving like we expect on a fixed set of examples. Having proper literal syntax (which checks my mistakes and doesn't do things behind my back) is definitely something I would want! Furthermore, there's also a huge problem with the |
There are more functions in the PinnedSizedBytes module that have referential transparency issues:
In a nutshell, if we want PinnedSizedBytes to be referentially safe in the face of mutations, then all construction and copying must happen in So IMO the sane solution would be to:
If you then still feel the need for a quasiquoter, it can be implemented fairly easily in terms of the new |
@tdammers - I mention
I'm not sure changing all of these to @lehins - thoughts? |
I do agree with @kozross , there are no problems with I do want to point out that the description of this ticket is a little misleading
In fact the whole So, @tdammers switching all to |
Right, yes. I think what it boils down to is that we need to decide whether we want to present
|
As observed here, this function has some severe issues with referential transparency, and is thus generally not safe. While this PR deprecates both
psbFromBytes
(andpsbZero
) using aDEPRECATED
pragma, as well as removing its uses internal tocardano-base
itself, this function is still used internally tocardano-crypto-class
:psbFromByteString
IsString (PinnedSizedBytes n)
While these should both be modified to not use
psbFromBytes
, theIsString
instance is rather horrifying: much like the same instance forByteString
, is hugely problematic for mostly the same reasons. I would propose removing thisIsString
instance wholesale, and replacing it with a quasi-quoter.The text was updated successfully, but these errors were encountered: