Skip to content

Commit 433fb11

Browse files
committed
chore: remove autoImplicit in Util (#14694)
All of them were easy to remove. Also remove on occurrence in Init/Logic which was not needed.
1 parent 0512d46 commit 433fb11

File tree

8 files changed

+9
-19
lines changed

8 files changed

+9
-19
lines changed

Mathlib/Init/Logic.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ Contributions assisting with this are appreciated.
2525
These will be deleted soon so will not significantly delay deleting otherwise empty `Init` files.
2626
-/
2727

28-
set_option autoImplicit true
29-
3028
universe u v
3129
variable {α : Sort u}
3230

Mathlib/Util/AtomM.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ This monad is used by tactics like `ring` and `abel` to keep uninterpreted atoms
1212
order, and also to allow unifying atoms up to a specified transparency mode.
1313
-/
1414

15-
set_option autoImplicit true
16-
1715
namespace Mathlib.Tactic
1816
open Lean Meta
1917

@@ -35,7 +33,7 @@ structure AtomM.State :=
3533
abbrev AtomM := ReaderT AtomM.Context <| StateRefT AtomM.State MetaM
3634

3735
/-- Run a computation in the `AtomM` monad. -/
38-
def AtomM.run (red : TransparencyMode) (m : AtomM α)
36+
def AtomM.run {α : Type} (red : TransparencyMode) (m : AtomM α)
3937
(evalAtom : Expr → MetaM Simp.Result := fun e ↦ pure { expr := e }) :
4038
MetaM α :=
4139
(m { red, evalAtom }).run' {}

Mathlib/Util/Export.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ A rudimentary export format, adapted from
1212
with support for lean 4 kernel primitives.
1313
-/
1414

15-
set_option autoImplicit true
16-
1715
open Lean (HashMap HashSet)
1816

1917
namespace Lean
@@ -196,7 +194,7 @@ where
196194

197195
end
198196

199-
def runExportM (m : ExportM α) : CoreM α := m.run' default
197+
def runExportM {α : Type} (m : ExportM α) : CoreM α := m.run' default
200198

201199
-- #eval runExportM (exportDef `Lean.Expr)
202200
end Export

Mathlib/Util/MemoFix.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import Lean.Data.HashMap
1010
1111
-/
1212

13-
set_option autoImplicit true
14-
13+
universe u v
1514
open ShareCommon
1615

1716
private unsafe abbrev ObjectMap := @Lean.HashMap Object Object ⟨Object.ptrEq⟩ ⟨Object.hash⟩

Mathlib/Util/Qq.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import Qq
1111
This file contains some additional functions for using the quote4 library more conveniently.
1212
-/
1313

14-
set_option autoImplicit true
1514
open Lean Elab Tactic Meta
1615

1716
namespace Qq
@@ -26,6 +25,6 @@ def inferTypeQ' (e : Expr) : MetaM ((u : Level) × (α : Q(Type $u)) × Q($α))
2625
let some v := (← instantiateLevelMVars u).dec | throwError "not a Type{indentExpr e}"
2726
pure ⟨v, α, e⟩
2827

29-
theorem QuotedDefEq.rfl : @QuotedDefEq u α a a := ⟨⟩
28+
theorem QuotedDefEq.rfl {u : Level} {α : Q(Sort u)} {a : Q(«»)} : @QuotedDefEq u α a a := ⟨⟩
3029

3130
end Qq

Mathlib/Util/Superscript.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ However, note that Unicode has a rather restricted character set for superscript
2424
parser for complex expressions.
2525
-/
2626

27-
set_option autoImplicit true
27+
universe u
2828

2929
namespace Mathlib.Tactic
30+
3031
open Lean Parser PrettyPrinter
32+
3133
namespace Superscript
3234

3335
instance : Hashable Char := ⟨fun c => hash c.1

Mathlib/Util/Tactic.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ import Lean.MetavarContext
1111
[TODO] Ideally we would find good homes for everything in this file, eventually removing it.
1212
-/
1313

14-
set_option autoImplicit true
15-
1614
namespace Mathlib.Tactic
1715

1816
open Lean Meta Tactic
1917

20-
variable [Monad m]
18+
variable {m : TypeType} [Monad m]
2119

2220
/--
2321
`modifyMetavarDecl mvarId f` updates the `MetavarDecl` for `mvarId` with `f`.

Mathlib/Util/WithWeakNamespace.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import Lean
1212
Changes the current namespace without causing scoped things to go out of scope.
1313
-/
1414

15-
set_option autoImplicit true
16-
1715
namespace Lean.Elab.Command
1816

1917
/-- Adds the name to the namespace, `_root_`-aware.
@@ -29,7 +27,7 @@ def resolveNamespace (ns : Name) : Name → Name
2927
| Name.anonymous => ns
3028

3129
/-- Changes the current namespace without causing scoped things to go out of scope -/
32-
def withWeakNamespace (ns : Name) (m : CommandElabM α) : CommandElabM α := do
30+
def withWeakNamespace {α : Type} (ns : Name) (m : CommandElabM α) : CommandElabM α := do
3331
let old ← getCurrNamespace
3432
let ns := resolveNamespace old ns
3533
modify fun s ↦ { s with env := s.env.registerNamespace ns }

0 commit comments

Comments
 (0)