chore: move Stack and Queue to Std

This commit is contained in:
Leonardo de Moura 2020-06-25 11:35:09 -07:00
parent 18431d7b52
commit 59c082ef1a
6 changed files with 7 additions and 22 deletions

View file

@ -22,5 +22,3 @@ import Init.Data.RBMap
import Init.Data.Option
import Init.Data.HashMap
import Init.Data.Random
import Init.Data.Queue
import Init.Data.Stack

View file

@ -1,7 +0,0 @@
/-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Daniel Selsam
-/
prelude
import Init.Data.Queue.Basic

View file

@ -1,7 +0,0 @@
/-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Daniel Selsam
-/
prelude
import Init.Data.Stack.Basic

View file

@ -4,3 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Std.Data.BinomialHeap
import Std.Data.DList
import Std.Data.Stack
import Std.Data.Queue

View file

@ -6,9 +6,7 @@ Authors: Daniel Selsam
Simple queue implemented using two lists.
Note: this is only a temporary placeholder.
-/
prelude
import Init.Data.Array
import Init.Data.Int
namespace Std
universes u v w
structure Queue (α : Type u) :=
@ -39,3 +37,4 @@ match q.dList with
| d::ds => some (d, { eList := [], dList := ds })
end Queue
end Std

View file

@ -5,9 +5,7 @@ Authors: Daniel Selsam
Simple stack API implemented using an array.
-/
prelude
import Init.Data.Array
import Init.Data.Int
namespace Std
universes u v w
structure Stack (α : Type u) :=
@ -39,3 +37,4 @@ def modify [Inhabited α] (s : Stack α) (f : αα) : Stack α :=
{ s with vals := s.vals.modify (s.vals.size-1) f }
end Stack
end Std