ligo/src/bin/cli_helpers.ml

10 lines
296 B
OCaml
Raw Normal View History

open Trace
2019-09-20 13:59:44 +04:00
open Main.Display
let toplevel ~(display_format : display_format) (x : string result) =
2019-09-04 20:41:14 +04:00
match x with
| Ok _ -> Format.printf "%a%!" (formatted_string_result_pp display_format) x
2019-09-04 20:41:14 +04:00
| Error _ ->
Format.eprintf "%a%!" (formatted_string_result_pp display_format) x ;
2019-09-04 20:41:14 +04:00
exit 1