Documentation

Lean.Data.Options

structure Lean.Options :
  • hasTrace : Bool

    Whether any option with prefix trace is set. This does not imply that any of such option is set to true but it does capture the most common case that no such option has ever been touched.

Instances For
    @[implicit_reducible]
    @[implicit_reducible]
    @[implicit_reducible]
    @[implicit_reducible]
    @[inline]
    Instances For
      @[deprecated Lean.Options.find? (since := "2026-01-15")]
      Instances For
        @[inline]
        def Lean.Options.get? {α : Type} [KVMap.Value α] (o : Options) (k : Name) :
        Instances For
          @[inline]
          def Lean.Options.get {α : Type} [KVMap.Value α] (o : Options) (k : Name) (defVal : α) :
          α
          Instances For
            @[inline]
            def Lean.Options.getBool (o : Options) (k : Name) (defVal : Bool := false) :
            Instances For
              @[inline]
              Instances For
                @[inline]
                Instances For
                  def Lean.Options.set {α : Type} [KVMap.Value α] (o : Options) (k : Name) (v : α) :
                  Instances For
                    @[inline]
                    Instances For
                      Instances For
                        Instances For
                          Instances For
                            Instances For
                              @[export lean_register_option]
                              def Lean.registerOption (name : Name) (decl : OptionDecl) :
                              Instances For
                                @[export lean_get_option_decls_array]
                                Instances For
                                  Instances For
                                    Instances For
                                      class Lean.MonadOptions (m : TypeType) :
                                      Instances
                                        @[implicit_reducible]
                                        def Lean.getBoolOption {m : TypeType} [Monad m] [MonadOptions m] (k : Name) (defValue : Bool := false) :
                                        Instances For
                                          def Lean.getNatOption {m : TypeType} [Monad m] [MonadOptions m] (k : Name) (defValue : Nat := 0) :
                                          m Nat
                                          Instances For
                                            class Lean.MonadWithOptions (m : TypeType) :
                                            Instances

                                              Remark: _inPattern is an internal option for communicating to the delaborator that the term being delaborated should be treated as a pattern.

                                              def Lean.withInPattern {m : TypeType} {α : Type} [MonadWithOptions m] (x : m α) :
                                              m α
                                              Instances For
                                                structure Lean.Option (α : Type) :

                                                A strongly-typed reference to an option.

                                                • name : Name
                                                • defValue : α
                                                Instances For
                                                  Instances For
                                                    @[implicit_reducible]
                                                    structure Lean.Option.Decl (α : Type) :
                                                    Instances For
                                                      def Lean.Option.get? {α : Type} [KVMap.Value α] (opts : Options) (opt : Lean.Option α) :
                                                      Instances For
                                                        def Lean.Option.get {α : Type} [KVMap.Value α] (opts : Options) (opt : Lean.Option α) :
                                                        α
                                                        Instances For
                                                          def Lean.Option.getM {m : TypeType} {α : Type} [Monad m] [MonadOptions m] [KVMap.Value α] (opt : Lean.Option α) :
                                                          m α
                                                          Instances For
                                                            def Lean.Option.set {α : Type} [KVMap.Value α] (opts : Options) (opt : Lean.Option α) (val : α) :
                                                            Instances For
                                                              def Lean.Option.setIfNotSet {α : Type} [KVMap.Value α] (opts : Options) (opt : Lean.Option α) (val : α) :

                                                              Similar to set, but update opts only if it doesn't already contains an setting for opt.name

                                                              Instances For
                                                                def Lean.Option.register {α : Type} [KVMap.Value α] (name : Name) (decl : Option.Decl α) (ref : Name := by exact decl_name%) :
                                                                Instances For