Skip to content

Commit

Permalink
chore: make section names more meaningful
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeizer committed Oct 4, 2024
1 parent 366d482 commit fa4030e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Tactics/Sym/AxEffects.lean
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ structure AxEffects where

namespace AxEffects

/-! ## Monad getters -/
/-! ## Monadic getters -/

section Monad
section MonadicGetters
variable {m} [Monad m] [MonadReaderOf AxEffects m]

def getCurrentState : m Expr := do return (← read).currentState
Expand All @@ -117,7 +117,7 @@ def getCurrentStateName : m Name := do
| throwError "error: unknown fvar: {state}"
return decl.userName

end Monad
end MonadicGetters

/-! ## Initial Reflected State -/

Expand Down Expand Up @@ -236,7 +236,7 @@ def getField (eff : AxEffects) (fld : StateField) : MetaM FieldEffect :=
let proof ← eff.mkAppNonEffect (toExpr fld)
pure { value, proof }

section Monad
section MonadicGettersAndSetters
variable {m} [Monad m] [MonadLiftT MetaM m]

variable [MonadReaderOf AxEffects m] in
Expand Down Expand Up @@ -264,7 +264,7 @@ This is a specialization of `setFieldEffect`. -/
def setErrorProof (proof : Expr) : m Unit :=
setFieldEffect .ERR { value := mkConst ``StateError.None, proof }

end Monad
end MonadicGettersAndSetters

/-! ## Update a Reflected State -/

Expand Down
4 changes: 2 additions & 2 deletions Tactics/Sym/Context.lean
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ or throw an error if no local variable of that name exists -/
def hRunDecl : MetaM LocalDecl := do
findFromUserName c.h_run

section Monad
section MonadicGetters
variable {m} [Monad m] [MonadReaderOf SymContext m]

def getCurrentStateNumber : m Nat := do return (← read).currentStateNumber
Expand All @@ -187,7 +187,7 @@ def getNextStateName : m Name := do
let c ← read
return Name.mkSimple s!"{c.state_prefix}{c.currentStateNumber + 1}"

end Monad
end MonadicGetters

end

Expand Down

0 comments on commit fa4030e

Please sign in to comment.