Skip to content

Commit

Permalink
chore: deprecate LazyList (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
semorrison committed Jul 22, 2024
1 parent ac82ca1 commit d2b1546
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Batteries/Data/LazyList.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Simon Hudon
-/
import Batteries.Data.Thunk

/-!
# Lazy lists
Deprecated. This module is deprecated and will be removed in the future.
Most use cases can use `MLList`. Without custom support from the kernel
(previously provided in Lean 3) this type is not very useful,
but was ported from Lean 3 anyway.
The type `LazyList α` is a lazy list with elements of type `α`.
In the VM, these are potentially infinite lists
where all elements after the first are computed on-demand.
Expand All @@ -18,13 +22,15 @@ logically we can prove that `LazyList α` is isomorphic to `List α`.)
/-- Lazy list.
All elements (except the first) are computed lazily.
-/
@[deprecated "Consider using `MLList`." (since := "2024-07-15")]
inductive LazyList (α : Type u) : Type u
/-- The empty lazy list. -/
| nil : LazyList α
/-- Construct a lazy list from an element and a tail inside a thunk. -/
| cons (hd : α) (tl : Thunk <| LazyList α) : LazyList α


set_option linter.deprecated false
namespace LazyList


Expand Down

0 comments on commit d2b1546

Please sign in to comment.