1 Require Export Recursion.Monad.
2 Require Export Recursion.Termination.
4 (* evaluate up to [n] computation steps *)
5 Fixpoint bounded_eval (A:Set) (n:nat) (c:#A) {struct n} : option A :=
12 match (bounded_eval _ n' c') with
14 | Some a => bounded_eval A n' (f a)
19 Inductive Unit : Set := unit : Unit.
20 Definition eval (A:Set) (c:#A) (t:Terminates c) : A :=
21 match eval' c Unit (Return unit) (termination_is_safe A c t) with
25 Implicit Arguments eval [A].
26 Implicit Arguments bounded_eval [A].