IntersectMBO / IntersectMBO/cardano-base
Clear away psbFromBytes
- Dominant language
- Haskell
- Stars
- 105
- Forks
- 54
- Avg merge
- 9d 2h
- Merged PRs (30d)
- 4
Description
As observed [here](https://github.com/input-output-hk/cardano-base/pull/289#discussion_r923916441), this function has some severe issues with referential transparency, and is thus generally not safe. While [this PR](https://github.com/input-output-hk/cardano-base/pull/289) deprecates both `psbFromBytes` (and `psbZero`) using a `DEPRECATED` pragma, as well as removing its uses internal to `cardano-base` itself, this function is still used internally to `cardano-crypto-class`:
* `psbFromByteString`
* `IsString (PinnedSizedBytes n)`
While these should both be modified to _not_ use `psbFromBytes`, the `IsString` instance is rather horrifying: much like the same instance for `ByteString`, is hugely problematic for mostly the same reasons. I would propose removing this `IsString` instance wholesale, and replacing it with a quasi-quoter.
Contributor guide
Assessment
This issue has not been assessed yet.