Skip to content

Commit 0affdf5

Browse files
committed
Fixed error function
1 parent 60a35c1 commit 0affdf5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Extraction.v

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ Module Loop.
1818
Parameter infinity : nat.
1919
Extract Constant infinity => "let rec inf = S inf in inf".
2020

21-
Parameter error : forall {A}, A.
22-
Extract Constant error => "failwith ""Unexpected end of infinite loop.""".
21+
Parameter error : forall {A B}, A -> B.
22+
Extract Constant error =>
23+
"fun _ -> failwith ""Unexpected end of infinite loop.""".
2324
End Loop.
2425

2526
(** Interface to the Big_int library. *)
@@ -173,7 +174,7 @@ Definition launch (main : list LString.t -> C.t System.effect unit) : unit :=
173174
Module I.
174175
Fixpoint eval_aux {A} (steps : nat) (x : C.I.t System.effect A) : Lwt.t A :=
175176
match steps with
176-
| O => Loop.error
177+
| O => Loop.error tt
177178
| S steps =>
178179
match x with
179180
| C.I.Ret _ v => Lwt.ret v

0 commit comments

Comments
 (0)