Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option のデフォルト値を取得する関数 #962

Closed
Seasawher opened this issue Oct 7, 2024 · 1 comment · Fixed by #966
Closed

option のデフォルト値を取得する関数 #962

Seasawher opened this issue Oct 7, 2024 · 1 comment · Fixed by #966

Comments

@Seasawher
Copy link
Member

open Lean Elab Command

def getDefaultValue (opt : Name) : CommandElabM Unit := do
  let decls ← getOptionDecls
  match decls.find? opt with
  | some decl =>
    logInfo m!"default value of {opt} is {decl.defValue}"
  | none =>
    logInfo m!"{opt} is unknown"

#eval getDefaultValue `autoImplicit
#eval getDefaultValue `relaxedAutoImplicit
#eval getDefaultValue `linter.flexible
@Seasawher
Copy link
Member Author

Zulip: check dafault value of option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant