Fewer syntax modules for error-monad
Context
A common issue with the existing error-monad syntax module is that there is just too many of them and which one am i supposed to open anyway how do I even know why shouldnt i just open the top one then it seems simpler.
This MR addresses this issue. Specifically, it removes the Tzresult_syntax and Lwt_tzresult_syntax modules entirely. Instead, it moves the tz-specific functions of these modules (essentially fail and and*) into the non-tz-specific version. The function (rather than the module) carries a prefix.
Instead of
let open Lwt_tzresult_syntax in
… fail …
you write
let open Lwt_result_syntax in
… tzfail …
All polymorphic functions/operators are left untouched.
The simplest way to understand the impact on programmers is to look at the diff of the tutorial.
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment, theDevelopment Versionsection ofCHANGES.mdfor everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Raphaël Proust