- ofString: String → Lean.DataValue
- ofBool: Bool → Lean.DataValue
- ofName: Lake.Name → Lean.DataValue
- ofNat: Nat → Lean.DataValue
- ofInt: Int → Lean.DataValue
- ofSyntax: Lean.Syntax → Lean.DataValue
Value stored in a key-value map.
Instances For
@[export lean_data_value_beq]
Instances For
@[export lean_mk_bool_data_value]
Instances For
@[export lean_data_value_bool]
Instances For
@[export lean_data_value_to_string]
Instances For
- entries : List (Lake.Name × Lean.DataValue)
A key-value map. We use it to represent user-selected options and Expr.mdata
.
Remark: we do not use RBMap
here because we need to manipulate KVMap
objects in
C++ and RBMap
is implemented in Lean. So, we use just a List
until we can
generate C++ code from Lean code.
Instances For
Equations
- Lean.KVMap.findCore [] x = none
- Lean.KVMap.findCore ((k, v) :: m) x = if (k == x) = true then some v else Lean.KVMap.findCore m x
Instances For
Instances For
Equations
- Lean.KVMap.insertCore [] x x = [(x, x)]
- Lean.KVMap.insertCore ((k, v) :: m) x x = if (k == x) = true then (k, x) :: m else (k, v) :: Lean.KVMap.insertCore m x x
Instances For
Instances For
Instances For
Instances For
Instances For
def
Lean.KVMap.getName
(m : Lean.KVMap)
(k : Lake.Name)
(defVal : optParam Lake.Name Lean.Name.anonymous)
:
Instances For
def
Lean.KVMap.getSyntax
(m : Lean.KVMap)
(k : Lake.Name)
(defVal : optParam Lean.Syntax Lean.Syntax.missing)
:
Instances For
Instances For
Instances For
Instances For
@[inline]
def
Lean.KVMap.forIn
{δ : Type w}
{m : Type w → Type w'}
[Monad m]
(kv : Lean.KVMap)
(init : δ)
(f : Lake.Name × Lean.DataValue → δ → m (ForInStep δ))
:
m δ
Instances For
Equations
- Lean.KVMap.subsetAux [] x = true
- Lean.KVMap.subsetAux ((k, v₁) :: m₁) x = match Lean.KVMap.find x k with | some v₂ => v₁ == v₂ && Lean.KVMap.subsetAux m₁ x | none => false
Instances For
- toDataValue : α → Lean.DataValue
- ofDataValue? : Lean.DataValue → Option α
Instances
@[inline]
Instances For
@[inline]
Instances For
@[inline]