Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convenience pretty printer for Either.t (added in 4.12) #10242

Merged
merged 9 commits into from
Apr 21, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/format.ml
Expand Up @@ -1237,6 +1237,10 @@ let pp_print_result ~ok ~error ppf = function
| Ok v -> ok ppf v
| Error e -> error ppf e

let pp_print_either ~left ~right ppf = function
| Either.Left l -> left ppf l
| Either.Right r -> error ppf r
ebresafegaga marked this conversation as resolved.
Show resolved Hide resolved

(**************************************************************)

let compute_tag output tag_acc =
Expand Down