ligo/Tests/a.li

29 lines
505 B
Plaintext
Raw Normal View History

2019-02-26 01:29:29 +04:00
type t is int * string
type u is t
type v is record foo: key; bar: mutez; baz: address end
type w is K of (U of int) (*v * u*)
2019-02-26 01:29:29 +04:00
storage s : w // Line comment
operations o : u;
2019-02-26 01:29:29 +04:00
(* Block comment *)
2019-02-26 01:29:29 +04:00
2019-03-10 16:37:03 +04:00
entrypoint g (const l : list (int)) is
function f (const x : int) : int is
var y : int := 5 - x
const z : int = 6
begin
y := x + y
end with y * 2
2019-02-26 01:29:29 +04:00
begin
match l with
[] -> null
| h#t -> q (h+2)
2019-02-26 01:29:29 +04:00
end
end
begin
g (Unit);
fail "in extremis"
2019-02-26 01:29:29 +04:00
end