Refactor Observable to directly return value instead of Maybe
There were some cases where the implicit Maybe was problematic, because it was impossible to guarantee a value. This also improved the `runQuery` return type (returning only an `Either` or an `Either e Maybe` is semantically easier to understand than the old `Maybe Either`. This introduced a lot of necessary changes, but the result is a better `runQuery` API: Every Query is now answered with either an exception detailing why the query failed, or with a result.
Showing
- src/lib/Qd/Observable.hs 84 additions, 63 deletionssrc/lib/Qd/Observable.hs
- src/lib/Qd/Observable/ObservableMap.hs 4 additions, 4 deletionssrc/lib/Qd/Observable/ObservableMap.hs
- src/lib/Qd/Observable/ObservablePriority.hs 2 additions, 2 deletionssrc/lib/Qd/Observable/ObservablePriority.hs
- test/Qd/ObservableSpec.hs 16 additions, 16 deletionstest/Qd/ObservableSpec.hs
Loading
Please register or sign in to comment