State-indexed values #
@[reducible, inline]
A value indexed by a curried tuple of states.
example : SVal [Nat, Bool] String = (Nat → Bool → String) := rfl
Equations
- Std.Do.SVal [] α = α
- Std.Do.SVal (σ :: σs_2) α = (σ → Std.Do.SVal σs_2 α)
Instances For
A tuple capturing the whole state of an SVal
.
Equations
- Std.Do.SVal.StateTuple [] = Unit
- Std.Do.SVal.StateTuple (σ :: σs_2) = (σ × Std.Do.SVal.StateTuple σs_2)
Instances For
instance
Std.Do.SVal.instInhabitedStateTupleCons
{σ : Type}
{σs : List Type}
[Inhabited σ]
[Inhabited (StateTuple σs)]
:
Inhabited (StateTuple (σ :: σs))
Curry a function taking a StateTuple
into an SVal
.
Instances For
@[simp]
Equations
- Std.Do.SVal.instInhabited = { default := Std.Do.SVal.pure default }
Equations
- Std.Do.SVal.instGetTyCons = { get := fun (s : σ) => Std.Do.SVal.pure s }
Equations
- Std.Do.SVal.instGetTyCons_1 = { get := fun (x : σ₂) => Std.Do.SVal.GetTy.get }