diff options
| author | msozeau | 2010-06-30 19:43:44 +0000 |
|---|---|---|
| committer | msozeau | 2010-06-30 19:43:44 +0000 |
| commit | 4f70016289f15526b162582fc267374e2b60448e (patch) | |
| tree | 47abfac4e62dfe1dc5dcfad34050634480518709 /lib | |
| parent | 13e53564fdc4beb14bd04612214a648630549417 (diff) | |
Move [delayed] to util and use [force_delayed] everywhere to force
thunks. Move from [lazy] to [delayed] in subtac.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13227 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/util.ml | 6 | ||||
| -rw-r--r-- | lib/util.mli | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml index ad48e7981a..2711eee24a 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -1179,6 +1179,12 @@ let iterate_for a b f x = let rec iterate i v = if i > b then v else iterate (succ i) (f i v) in iterate a x +(* Delayed computations *) + +type 'a delayed = unit -> 'a + +let delayed_force f = f () + (* Misc *) type ('a,'b) union = Inl of 'a | Inr of 'b diff --git a/lib/util.mli b/lib/util.mli index f8fbc1f68c..bbef3462ad 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -291,6 +291,12 @@ val iterate : ('a -> 'a) -> int -> 'a -> 'a val repeat : int -> ('a -> unit) -> 'a -> unit val iterate_for : int -> int -> (int -> 'a -> 'a) -> 'a -> 'a +(** {6 Delayed computations. } *) + +type 'a delayed = unit -> 'a + +val delayed_force : 'a delayed -> 'a + (** {6 Misc. } *) type ('a,'b) union = Inl of 'a | Inr of 'b |
