Documentation

Lake.Toml.Encode

TOML Encoders #

This module contains definitions to assist in encoding Lean types into TOML data values.

class Lake.ToToml (α : Type u) :
Instances
    class Lake.ToToml? (α : Type u) :
    Instances
      @[instance 10000]
      instance Lake.instToToml?OfToToml {α : Type u_1} [ToToml α] :
      Equations
      def Lake.Toml.encodeArray? {α : Type u_1} [ToToml? α] (as : Array α) :
      Equations
      Instances For
        instance Lake.instToToml?Array {α : Type u_1} [ToToml? α] :
        Equations
        instance Lake.instToToml?Option {α : Type u_1} [ToToml? α] :
        Equations
        class Lake.Toml.SmartInsert (α : Type u) :
        • smartInsert (k : Lean.Name) : αTableTable

          Insert a value into a table unless it represents a nullish value.

        Instances
          @[instance 100]
          Equations
          @[inline]
          def Lake.Toml.Table.insert {α : Type u_1} [enc : ToToml α] (k : Lean.Name) (v : α) (t : Table) :

          Inserts the encoded value into the table.

          Equations
          Instances For
            @[macro_inline]
            def Lake.Toml.Table.insertSome {α : Type u_1} [enc : ToToml α] (k : Lean.Name) (v? : Option α) (t : Table) :

            If the value is not none, inserts the encoded value into the table.

            Equations
            Instances For
              @[inline]
              def Lake.Toml.Table.smartInsert {α : Type u_1} [SmartInsert α] (k : Lean.Name) (v : α) (t : Table) :

              Insert a value into the table unless it represents a nullish value.

              Equations
              Instances For
                @[macro_inline]
                def Lake.Toml.Table.insertIf {α : Type u_1} [enc : ToToml α] (p : Bool) (k : Lean.Name) (v : α) (t : Table) :

                Insert a value into the table if p is true.

                Equations
                Instances For
                  @[macro_inline]
                  def Lake.Toml.Table.insertUnless {α : Type u_1} [enc : ToToml α] (p : Bool) (k : Lean.Name) (v : α) (t : Table) :

                  Insert a value into the table if p is false.

                  Equations
                  Instances For
                    @[inline]
                    def Lake.Toml.Table.insertD {α : Type u_1} [enc : ToToml α] [BEq α] (k : Lean.Name) (v default : α) (t : Table) :

                    Inserts the value into the table if it is not equal to default.

                    Equations
                    Instances For