naively connects big_map to the transpiler

This commit is contained in:
Lesenechal Remi 2019-08-29 13:12:06 +02:00
parent efc4cdb19a
commit 4fec6f1624
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,5 @@
type storage_ is big_map(int, int) * unit
function main(const p : unit; const s : storage_) : list(operation) * storage_ is
block { skip }
with ((nil : list(operation)), s)

View File

@ -113,6 +113,9 @@ let rec translate_type (t:AST.type_value) : type_value result =
| T_constant ("map", [key;value]) -> | T_constant ("map", [key;value]) ->
let%bind kv' = bind_map_pair translate_type (key, value) in let%bind kv' = bind_map_pair translate_type (key, value) in
ok (T_map kv') ok (T_map kv')
| T_constant ("big_map", [key;value] ) ->
let%bind kv' = bind_map_pair translate_type (key, value) in
ok (T_map kv')
| T_constant ("list", [t]) -> | T_constant ("list", [t]) ->
let%bind t' = translate_type t in let%bind t' = translate_type t in
ok (T_list t') ok (T_list t')