diff --git a/src/ligo/contracts/new-syntax.mligo b/src/ligo/contracts/new-syntax.mligo index 6867b78cb..9a326d449 100644 --- a/src/ligo/contracts/new-syntax.mligo +++ b/src/ligo/contracts/new-syntax.mligo @@ -18,6 +18,6 @@ type param = { let%entry attempt (p:param) storage = if Crypto.hash (Bytes.pack p.attempt) <> Bytes.pack storage.challenge then failwith "Failed challenge" ; - let transfer = Operation.transfer sender 10tz in - let storage = storage.challenge <- p.new_challenge in + let transfer : operation = Operation.transfer (sender , 10tz) in + let storage : storage = storage.challenge <- p.new_challenge in ([] , storage) diff --git a/src/ligo/operators/operators.ml b/src/ligo/operators/operators.ml index f1b1c1862..98523c75c 100644 --- a/src/ligo/operators/operators.ml +++ b/src/ligo/operators/operators.ml @@ -25,6 +25,8 @@ module Simplify = struct module Camligo = struct let constants = [ ("Bytes.pack" , 1) ; + ("Crypto.hash" , 1) ; + ("Operation.transfer" , 2) ; ] end diff --git a/src/ligo/parser/camligo/generator.ml b/src/ligo/parser/camligo/generator.ml index 67ff57c7d..c21252744 100644 --- a/src/ligo/parser/camligo/generator.ml +++ b/src/ligo/parser/camligo/generator.ml @@ -582,9 +582,9 @@ module Expression = struct [tuple] ; [type_annotation] ; [lt ; le ; gt ; eq ; neq] ; - [application] ; [assignment] ; [cons] ; + [application] ; [addition ; substraction] ; [multiplication ; division] ; [list] ; diff --git a/src/ligo/simplify/camligo.ml b/src/ligo/simplify/camligo.ml index a45d3bd39..024b2d7a1 100644 --- a/src/ligo/simplify/camligo.ml +++ b/src/ligo/simplify/camligo.ml @@ -47,7 +47,9 @@ let get_p_variable : I.pattern -> string Location.wrap result = fun p -> | _ -> simple_fail "not a pattern variable" let get_p_typed_variable : I.pattern -> (string Location.wrap * I.restricted_type_expression Location.wrap) result = fun p -> - let%bind (p' , rte) = get_p_type_annotation p in + let%bind (p' , rte) = + trace (simple_error "get_p_typed_variable") @@ + get_p_type_annotation p in let%bind var = get_p_variable (unwrap p') in ok (var , rte)