Skip to content

Commit b9d13f4

Browse files
committed
chore: bump to Lean 4 nightly 2021-12-13 (#130)
1 parent e592389 commit b9d13f4

File tree

8 files changed

+10
-14
lines changed

8 files changed

+10
-14
lines changed

Mathlib/Data/ByteArray.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ def String.toAsciiByteArray (s : String) : ByteArray :=
9494

9595
/-- Convert a byte slice into a string. This does not handle non-ASCII characters correctly:
9696
every byte will become a unicode character with codepoint < 256. -/
97-
def ByteSlice.toString (bs : ByteSlice) : String := do
97+
def ByteSlice.toString (bs : ByteSlice) : String := Id.run do
9898
let mut s := ""
9999
for c in bs do s := s.push c.toChar
100100
s
101101

102102
instance : ToString ByteSlice where
103-
toString bs := do
103+
toString bs := Id.run do
104104
let mut s := ""
105105
for c in bs do s := s.push c.toChar
106106
s

Mathlib/Data/List/Defs.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ namespace List
1919
`[f 0 a₀, f 1 a₁, ...]`. -/
2020
def mapIdx (as : List α) (f : ℕ → α → β) : List β :=
2121
let rec loop : ℕ → List α → List β
22-
| _, [] => return []
22+
| _, [] => []
2323
| n, a :: as => f n a :: loop (n + 1) as
2424
loop 0 as
2525

2626
/-- Applicative variant of `mapWithIndex`. -/
2727
def mapIdxM {m : Type v → Type w} [Applicative m] (as : List α) (f : ℕ → α → m β) :
2828
m (List β) :=
2929
let rec loop : ℕ → List α → m (List β)
30-
| _, [] => return []
30+
| _, [] => []
3131
| n, a :: as => List.cons <$> f n a <*> loop (n + 1) as
3232
loop 0 as
3333

Mathlib/Lean/Expr.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace Name
3535

3636
/-- Find the largest prefix `n` of a `Name` such that `f n != none`, then replace this prefix
3737
with the value of `f n`. -/
38-
def mapPrefix (f : Name → Option Name) (n : Name) : Name := do
38+
def mapPrefix (f : Name → Option Name) (n : Name) : Name := Id.run do
3939
if let some n' := f n then return n'
4040
match n with
4141
| anonymous => anonymous

Mathlib/Mathport/Rename.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ initialize renameExtension : SimplePersistentEnvExtension (Name × Name) RenameM
2323
addImportedFn := fun es => mkStateFromImportedEntries (RenameMap.insertPair) {} es
2424
}
2525

26-
def getRenameMap (env : Environment) : RenameMap := do
26+
def getRenameMap (env : Environment) : RenameMap :=
2727
renameExtension.getState env
2828

2929
def addNameAlignment (n3 n4 : Name) : CoreM Unit := do

Mathlib/Tactic/Lint/Frontend.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ omits it from only the specified linter checks.
4747
sanity check, lint, cleanup, command, tactic
4848
-/
4949

50-
def Lean.TagAttribute.getDecls (attr : TagAttribute) (env : Environment) : Array Name := do
50+
def Lean.TagAttribute.getDecls (attr : TagAttribute) (env : Environment) : Array Name := Id.run do
5151
let st := attr.ext.toEnvExtension.getState env
5252
let mut decls := st.state.toArray
5353
for ds in st.importedEntries do

Mathlib/Tactic/Lint/Simp.lean

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import Mathlib.Tactic.Lint.Basic
77
import Mathlib.Tactic.OpenPrivate
88
open Lean Meta
99

10-
def Option.mapM [Monad m] (f : α → m β) : Option α → m (Option β)
11-
| none => none
12-
| some a => f a
13-
1410
namespace Mathlib.Tactic.Lint
1511

1612
/-!

Mathlib/Tactic/OpenPrivate.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def elabOpenPrivateLike (ids : Array Syntax) (tgts mods : Option (Array Syntax))
3838
for declName in (← getEnv).declsInModuleIdx modIdx do
3939
if isPrivateName declName then
4040
names := names.insert declName
41-
let appendNames (msg : String) : String := do
41+
let appendNames (msg : String) : String := Id.run do
4242
let mut msg := msg
4343
for c in names do
4444
if let some name := privateToUserName? c then
@@ -61,7 +61,7 @@ def elabOpenPrivateLike (ids : Array Syntax) (tgts mods : Option (Array Syntax))
6161
decls := decls.push (OpenDecl.explicit n new)
6262
else unreachable!
6363
| _ => throwError s!"provided name is ambiguous: found {found.map privateToUserName?}"
64-
modifyScope fun scope => do
64+
modifyScope fun scope => Id.run do
6565
let mut openDecls := scope.openDecls
6666
for decl in decls do
6767
openDecls := decl::openDecls

lean-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
leanprover/lean4:nightly-2021-12-08
1+
leanprover/lean4:nightly-2021-12-13

0 commit comments

Comments
 (0)