Documentation

Lean.Data.KVMap

inductive Lean.DataValue :

Value stored in a key-value map.

Instances For
    @[export lean_data_value_beq]
    Equations
    Instances For
      @[export lean_mk_bool_data_value]
      Equations
      Instances For
        @[export lean_data_value_bool]
        Equations
        Instances For
          structure Lean.KVMap :

          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
            Equations
            Instances For
              Equations
              Instances For
                Equations
                Instances For
                  Equations
                  Instances For
                    def Lean.KVMap.findD (m : KVMap) (k : Name) (d₀ : DataValue) :
                    Equations
                    Instances For
                      Equations
                      Instances For
                        Equations
                        Instances For
                          Equations
                          Instances For

                            Erase an entry from the map

                            Equations
                            Instances For
                              def Lean.KVMap.getString (m : KVMap) (k : Name) (defVal : String := "") :
                              Equations
                              Instances For
                                def Lean.KVMap.getNat (m : KVMap) (k : Name) (defVal : Nat := 0) :
                                Equations
                                Instances For
                                  def Lean.KVMap.getInt (m : KVMap) (k : Name) (defVal : Int := 0) :
                                  Equations
                                  Instances For
                                    def Lean.KVMap.getBool (m : KVMap) (k : Name) (defVal : Bool := false) :
                                    Equations
                                    Instances For
                                      def Lean.KVMap.getName (m : KVMap) (k : Name) (defVal : Name := Name.anonymous) :
                                      Equations
                                      Instances For
                                        Equations
                                        Instances For
                                          def Lean.KVMap.setString (m : KVMap) (k : Name) (v : String) :
                                          Equations
                                          Instances For
                                            def Lean.KVMap.setNat (m : KVMap) (k : Name) (v : Nat) :
                                            Equations
                                            Instances For
                                              def Lean.KVMap.setInt (m : KVMap) (k : Name) (v : Int) :
                                              Equations
                                              Instances For
                                                def Lean.KVMap.setBool (m : KVMap) (k : Name) (v : Bool) :
                                                Equations
                                                Instances For
                                                  def Lean.KVMap.setName (m : KVMap) (k v : Name) :
                                                  Equations
                                                  Instances For
                                                    def Lean.KVMap.setSyntax (m : KVMap) (k : Name) (v : Syntax) :
                                                    Equations
                                                    Instances For

                                                      Update a String entry based on its current value.

                                                      Equations
                                                      Instances For
                                                        def Lean.KVMap.updateNat (m : KVMap) (k : Name) (f : NatNat) :

                                                        Update a Nat entry based on its current value.

                                                        Equations
                                                        Instances For
                                                          def Lean.KVMap.updateInt (m : KVMap) (k : Name) (f : IntInt) :

                                                          Update an Int entry based on its current value.

                                                          Equations
                                                          Instances For
                                                            def Lean.KVMap.updateBool (m : KVMap) (k : Name) (f : BoolBool) :

                                                            Update a Bool entry based on its current value.

                                                            Equations
                                                            Instances For
                                                              def Lean.KVMap.updateName (m : KVMap) (k : Name) (f : NameName) :

                                                              Update a Name entry based on its current value.

                                                              Equations
                                                              Instances For

                                                                Update a Syntax entry based on its current value.

                                                                Equations
                                                                Instances For
                                                                  @[inline]
                                                                  def Lean.KVMap.forIn {δ : Type w} {m : Type w → Type w'} [Monad m] (kv : KVMap) (init : δ) (f : Name × DataValueδm (ForInStep δ)) :
                                                                  m δ
                                                                  Equations
                                                                  Instances For
                                                                    Equations
                                                                    Instances For
                                                                      Equations
                                                                      Instances For
                                                                        def Lean.KVMap.mergeBy (mergeFn : NameDataValueDataValueDataValue) (l r : KVMap) :
                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          def Lean.KVMap.eqv (m₁ m₂ : KVMap) :
                                                                          Equations
                                                                          Instances For
                                                                            class Lean.KVMap.Value (α : Type) :
                                                                            Instances
                                                                              @[inline]
                                                                              def Lean.KVMap.get? {α : Type} [Value α] (m : KVMap) (k : Name) :
                                                                              Equations
                                                                              Instances For
                                                                                @[inline]
                                                                                def Lean.KVMap.get {α : Type} [Value α] (m : KVMap) (k : Name) (defVal : α) :
                                                                                α
                                                                                Equations
                                                                                Instances For
                                                                                  @[inline]
                                                                                  def Lean.KVMap.set {α : Type} [Value α] (m : KVMap) (k : Name) (v : α) :
                                                                                  Equations
                                                                                  Instances For
                                                                                    @[inline]
                                                                                    def Lean.KVMap.update {α : Type} [Value α] (m : KVMap) (k : Name) (f : Option αOption α) :
                                                                                    Equations
                                                                                    Instances For
                                                                                      Equations
                                                                                      Equations
                                                                                      Equations
                                                                                      Equations
                                                                                      Equations
                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.