change bin display
This commit is contained in:
parent
1814d8cbfa
commit
097c5ca0fb
@ -54,6 +54,7 @@ module Michelson = struct
|
||||
|
||||
let i_if a b = prim ~children:[a;b] I_IF
|
||||
let i_if_none a b = prim ~children:[a;b] I_IF_NONE
|
||||
let i_if_left a b = prim ~children:[a;b] I_IF_LEFT
|
||||
let i_failwith = prim I_FAILWITH
|
||||
let i_assert_some = i_if_none (seq [i_failwith]) (seq [])
|
||||
|
||||
@ -78,6 +79,13 @@ module Michelson = struct
|
||||
let node = printable string_of_prim canonical in
|
||||
print_expr ppf node
|
||||
|
||||
let pp_stripped ppf (michelson:michelson) =
|
||||
let open Micheline_printer in
|
||||
let michelson' = strip_nops @@ strip_annots michelson in
|
||||
let canonical = strip_locations michelson' in
|
||||
let node = printable string_of_prim canonical in
|
||||
print_expr ppf node
|
||||
|
||||
let pp_naked ppf m =
|
||||
let naked = strip_annots m in
|
||||
pp ppf naked
|
||||
|
@ -81,7 +81,7 @@ let compile_contract_file : string -> string -> string result = fun source entry
|
||||
trace (simple_error "compiling") @@
|
||||
Compiler.translate_contract mini_c entry_point in
|
||||
let str =
|
||||
Format.asprintf "%a" Micheline.Michelson.pp michelson in
|
||||
Format.asprintf "%a" Micheline.Michelson.pp_stripped michelson in
|
||||
ok str
|
||||
|
||||
let compile_contract_parameter : string -> string -> string -> string result = fun source entry_point expression ->
|
||||
@ -126,7 +126,7 @@ let compile_contract_parameter : string -> string -> string -> string result = f
|
||||
trace (simple_error "compiling expression") @@
|
||||
Compiler.translate_value mini_c in
|
||||
let str =
|
||||
Format.asprintf "%a" Micheline.Michelson.pp michelson in
|
||||
Format.asprintf "%a" Micheline.Michelson.pp_stripped michelson in
|
||||
ok str
|
||||
in
|
||||
ok expr
|
||||
|
Loading…
Reference in New Issue
Block a user