You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means, that if I have primitives containing nonce, generators for these primitives are bound to IO too. If I want to use deterministic generation in tests, I have to re-implement generation logic from scratch in pure environment.
See this module from Morley project as an example. It declares createChestAndChestKey generator in IO, and then has to re-implement it from scratch in pure way, see createChestAndChestKeyFromSeed.
So I want crypto-sodium to expose some MonadRandom, and let the generation of nonce work there.
Acceptance criteria
That module from Morley defines only one createChestAndChestKey generator.
This generator is easy to run both in IO and in Hedgehog tests.
The text was updated successfully, but these errors were encountered:
Description
Currently,
generate :: IO Nonce
works only inIO
.This means, that if I have primitives containing nonce, generators for these primitives are bound to
IO
too. If I want to use deterministic generation in tests, I have to re-implement generation logic from scratch in pure environment.See this module from Morley project as an example. It declares
createChestAndChestKey
generator inIO
, and then has to re-implement it from scratch in pure way, seecreateChestAndChestKeyFromSeed
.So I want crypto-sodium to expose some
MonadRandom
, and let the generation of nonce work there.Acceptance criteria
createChestAndChestKey
generator.IO
and in Hedgehog tests.The text was updated successfully, but these errors were encountered: