doc: apply suggestions from code review
Co-authored-by: Gabriel Ebner <gebner@gebner.org>
This commit is contained in:
parent
64dec36ae3
commit
0bfee4fe1f
3 changed files with 7 additions and 7 deletions
|
|
@ -864,7 +864,7 @@ instance : Inhabited UInt8 where
|
|||
default := UInt8.ofNatCore 0 (by decide)
|
||||
|
||||
def UInt16.size : Nat := 65536
|
||||
/-- Unsigned, 16-bit integer. -/
|
||||
/-- Unsigned 16-bit integer. -/
|
||||
structure UInt16 where
|
||||
val : Fin UInt16.size
|
||||
|
||||
|
|
@ -971,7 +971,7 @@ theorem usize_size_eq : Or (Eq USize.size 4294967296) (Eq USize.size 18446744073
|
|||
| _, Or.inr rfl => Or.inr (by decide)
|
||||
|
||||
/-- A USize is an unsigned integer with the size of a word
|
||||
for the platform's arctitecture.
|
||||
for the platform's architecture.
|
||||
|
||||
For example, if running on a 32-bit machine, USize is equivalent to UInt32.
|
||||
Or on a 64-bit machine, UInt64.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Lean.Meta
|
|||
| none => p? (← whnf e)
|
||||
| s => return s
|
||||
|
||||
/-- matches `e` with `lhs = rhs : α` and returns `(α, lhs, rhs)`. -/
|
||||
/-- Matches `e` with `lhs = (rhs : α)` and returns `(α, lhs, rhs)`. -/
|
||||
def matchEq? (e : Expr) : MetaM (Option (Expr × Expr × Expr)) :=
|
||||
matchHelper? e fun e => return Expr.eq? e
|
||||
|
||||
|
|
|
|||
|
|
@ -421,10 +421,10 @@ def assignLevelMVar [MonadMCtx m] (mvarId : MVarId) (val : Level) : m Unit :=
|
|||
modifyMCtx fun m => { m with lAssignment := m.lAssignment.insert mvarId val, usedAssignment := true }
|
||||
|
||||
/--
|
||||
Add `mvarId := u` to the metavariable assignment.
|
||||
This method does not check whether `mvarId` is already assigned, nor it checks whether
|
||||
a cycle is being introduced.
|
||||
This is a low-level API, and it is safer to use `isDefEq (mkLevelMVar mvarId) u`.
|
||||
Add `mvarId := u` to the metavariable assignment.
|
||||
This method does not check whether `mvarId` is already assigned, nor it checks whether
|
||||
a cycle is being introduced, or whether the expression has the right type.
|
||||
This is a low-level API, and it is safer to use `isDefEq (mkLevelMVar mvarId) u`.
|
||||
-/
|
||||
def assignExprMVar [MonadMCtx m] (mvarId : MVarId) (val : Expr) : m Unit :=
|
||||
modifyMCtx fun m => { m with eAssignment := m.eAssignment.insert mvarId val, usedAssignment := true }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue