input-output-hk / input-output-hk/quickcheck-dynamic
Make dependent actions shrink
- Dominant language
- Haskell
- Stars
- 35
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
In situations like this:
```
do var0 <- action $ Deploy
var1 <- action $ Step var0
var2 <- action $ Step var1
var3 <- action $ Step var2
```
Where `Step varX` makes `X` unuseable in a future action (it consumes the input) you run into trouble when trying to shrink away `Step var0, Step var1` because shrinking `var3` to `var0` is not valid.
To get around this one could shrink the sequence to something like this:
```
do var0 <- action $ Deploy
var1 <- action $ Step var0
var2 <- pure var1
var3 <- action $ Step var2
```
which would allow two-step shrinking of `var3` to `var0` via `var2` and `var1`.
Contributor guide
Assessment
This issue has not been assessed yet.