summaryrefslogtreecommitdiff
path: root/tests/coq/misc/InfiniteLoop.v
blob: 1c0ccbe0c3da316561885c955a269fc7ca7978e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *)
(** [infinite_loop] *)
Require Import Primitives.
Import Primitives.
Require Import Coq.ZArith.ZArith.
Require Import List.
Import ListNotations.
Local Open Scope Primitives_scope.
Module InfiniteLoop.

(** [infinite_loop::bar]:
    Source: 'tests/src/infinite-loop.rs', lines 4:0-4:8 *)
Definition bar : result unit :=
  Ok tt.

(** [infinite_loop::foo]: loop 0:
    Source: 'tests/src/infinite-loop.rs', lines 6:0-10:1 *)
Fixpoint foo_loop (n : nat) : result unit :=
  match n with | O => Fail_ OutOfFuel | S n1 => _ <- bar; foo_loop n1 end
.

(** [infinite_loop::foo]:
    Source: 'tests/src/infinite-loop.rs', lines 6:0-6:8 *)
Definition foo (n : nat) : result unit :=
  foo_loop n.

End InfiniteLoop.