Commit d153f06
committed
refactor(cabal-install, cabal-install-solver): avoid using "error" in validateSolverResult
- Add a `step` helper and a `MonadFail` instance to `Progress`
- Refactor `validateSolverResult` to integrate into the `Progress` monad chain
using `fail` instead of `error`, giving structured failure instead of an
uncatchable exception1 parent ec8052b commit d153f06
3 files changed
Lines changed: 31 additions & 25 deletions
File tree
- cabal-install-solver/src/Distribution/Solver/Types
- cabal-install
- src/Distribution/Client
- tests/UnitTests/Distribution/Solver/Modular
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | | - | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 1 | | |
6 | 2 | | |
7 | 3 | | |
| |||
805 | 801 | | |
806 | 802 | | |
807 | 803 | | |
808 | | - | |
809 | | - | |
810 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
811 | 807 | | |
812 | 808 | | |
813 | 809 | | |
| |||
835 | 831 | | |
836 | 832 | | |
837 | 833 | | |
| 834 | + | |
838 | 835 | | |
839 | 836 | | |
840 | 837 | | |
| |||
935 | 932 | | |
936 | 933 | | |
937 | 934 | | |
938 | | - | |
| 935 | + | |
939 | 936 | | |
940 | 937 | | |
941 | 938 | | |
942 | | - | |
943 | | - | |
944 | | - | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
945 | 942 | | |
946 | 943 | | |
947 | 944 | | |
| |||
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
0 commit comments