Forgot to fully resolved conflict due to removal of keyword fail
.
This commit is contained in:
parent
8257c5e6fe
commit
889a4d643d
@ -49,10 +49,6 @@ type kwd_contains = Region.t
|
||||
type kwd_down = Region.t
|
||||
type kwd_else = Region.t
|
||||
type kwd_end = Region.t
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
type kwd_fail = Region.t
|
||||
>>>>>>> e5e9fb8e2faa1a67595553ab83279d3eb2b64470
|
||||
type kwd_for = Region.t
|
||||
type kwd_from = Region.t
|
||||
type kwd_function = Region.t
|
||||
|
@ -33,10 +33,6 @@ type kwd_contains = Region.t
|
||||
type kwd_down = Region.t
|
||||
type kwd_else = Region.t
|
||||
type kwd_end = Region.t
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
type kwd_fail = Region.t
|
||||
>>>>>>> e5e9fb8e2faa1a67595553ab83279d3eb2b64470
|
||||
type kwd_for = Region.t
|
||||
type kwd_from = Region.t
|
||||
type kwd_function = Region.t
|
||||
|
@ -53,10 +53,6 @@
|
||||
%token <Region.t> Down (* "down" *)
|
||||
%token <Region.t> Else (* "else" *)
|
||||
%token <Region.t> End (* "end" *)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
%token <Region.t> Fail (* "fail" *)
|
||||
>>>>>>> e5e9fb8e2faa1a67595553ab83279d3eb2b64470
|
||||
%token <Region.t> For (* "for" *)
|
||||
%token <Region.t> Function (* "function" *)
|
||||
%token <Region.t> From (* "from" *)
|
||||
|
@ -10,7 +10,7 @@ function back (var store : store) : list (operation) * store is
|
||||
var operations : list (operation) := list []
|
||||
begin
|
||||
if now > store.deadline then
|
||||
fail "Deadline passed";
|
||||
failwith ("Deadline passed");
|
||||
else
|
||||
case store.backers[sender] of [
|
||||
None -> store.backers[sender] := amount
|
||||
@ -23,14 +23,14 @@ function claim (var store : store) : list (operation) * store is
|
||||
var operations : list (operation) := nil
|
||||
begin
|
||||
if now <= store.deadline then
|
||||
fail "Too soon."
|
||||
failwith ("Too soon.")
|
||||
else
|
||||
case store.backers[sender] of
|
||||
None ->
|
||||
fail "Not a backer."
|
||||
failwith ("Not a backer.")
|
||||
| Some (amount) ->
|
||||
if balance >= store.goal or store.funded then
|
||||
fail "Goal reached: no refund."
|
||||
failwith ("Goal reached: no refund.")
|
||||
else
|
||||
begin
|
||||
operations := list [transaction (unit, sender, amount)];
|
||||
@ -49,7 +49,7 @@ function withdraw (var store : store) : list (operation) * store is
|
||||
// or: patch store with record funded = True end;
|
||||
operations := list [Transfer (owner, balance)];
|
||||
};
|
||||
else fail "Below target."
|
||||
else failwith ("Below target.")
|
||||
else fail "Too soon.";
|
||||
else skip
|
||||
end with (operations, store)
|
||||
|
Loading…
Reference in New Issue
Block a user