Documentation

Lake.Toml.Decode

TOML Decoders #

This module contains definitions to assist in decoding TOML data values into concrete user types.

Instances For
    @[reducible, inline]
    abbrev Lake.Toml.DecodeM (α : Type) :
    Equations
    Instances For
      @[reducible, inline]
      Equations
      Instances For
        class Lake.DecodeToml (α : Type) :
        Instances
          @[reducible, inline]
          Equations
          Instances For
            @[inline]

            Run the decode action. If there were errors, throw. Otherwise, return the result.

            Equations
            Instances For
              @[inline]
              def Lake.Toml.tryDecodeD {α : Type} (default : α) (x : EDecodeM α) :

              Run the decode action. If it fails, keep the errors but return default.

              Equations
              Instances For
                @[inline]
                def Lake.Toml.tryDecode? {α : Type} (x : EDecodeM α) :

                Run the decode action. If it fails, keep the errors but return none.

                Equations
                Instances For
                  @[inline]
                  def Lake.Toml.tryDecode {α : Type} [Inhabited α] (x : EDecodeM α) :

                  Run the decode action. If it fails, keep the errors but return Inhabited.default.

                  Equations
                  Instances For
                    @[inline]
                    def Lake.Toml.optDecodeD {β : Type} {α : Type u_1} (default : β) (a? : Option α) (f : αEDecodeM β) :

                    If the value is not none, run the decode action. If it fails, add the errors to the state and return default.

                    Equations
                    Instances For
                      @[inline]
                      def Lake.Toml.optDecode {β : Type} {α : Type u_1} [Inhabited β] (a? : Option α) (f : αEDecodeM β) :

                      If the value is not none, run the decode action. If it fails, add the errors to the state and return Inhabited.default.

                      Equations
                      Instances For
                        @[inline]
                        def Lake.Toml.optDecode? {α : Type u_1} {β : Type} (a? : Option α) (f : αEDecodeM β) :

                        If the value is not none, run the decode action. If it fails, add the errors to the state and return none. Otherwise, return the result in some.

                        Equations
                        Instances For
                          def Lake.Toml.mergeErrors {α β γ : Type} (x₁ : EDecodeM α) (x₂ : EDecodeM β) (f : αβγ) :

                          If either action errors, throw the concatenated errors. Otherwise, if no errors, combine the results with f.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[inline]
                            Equations
                            Instances For
                              def Lake.Toml.decodeArray {α : Type} [dec : DecodeToml α] (vs : Array Value) :

                              Decode an array of TOML values, merging any errors from the elements into a single array.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Equations
                                Instances For
                                  @[inline]
                                  Equations
                                  Instances For
                                    def Lake.Toml.decodeKeyval {α : Type} [dec : DecodeToml α] (k : Lean.Name) (v : Value) :
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Equations
                                      Instances For
                                        @[inline]
                                        Equations
                                        Instances For
                                          @[inline]
                                          def Lake.Toml.Table.decode? {α : Type} [dec : DecodeToml α] (t : Table) (k : Lean.Name) :
                                          Equations
                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              @[inline]
                                              Equations
                                              Instances For
                                                @[inline]
                                                def Lake.Toml.Table.tryDecodeD {α : Type} [dec : DecodeToml α] (k : Lean.Name) (default : α) (t : Table) :
                                                Equations
                                                Instances For