lean4-htt/tests/elab/idSuggestShort.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

69 lines
2.3 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

set_option autoImplicit false
/--
error: Unknown identifier ``
Note: It is not possible to treat `` as an implicitly bound variable here because the `autoImplicit` option is set to `false`.
Hint: Perhaps you meant `Nat` in place of ``:
[apply] `Nat`
-/
#guard_msgs in example : := 3
/--
error: Unknown identifier `Result`
Note: It is not possible to treat `Result` as an implicitly bound variable here because the `autoImplicit` option is set to `false`.
Hint: Perhaps you meant `Except` in place of `Result`:
[apply] `Except`
-/
#guard_msgs in example : Result String Nat := .ok 3
set_option autoImplicit true
-- The suggestion infrastructure doesn't help us here due to autobinding
/--
error: failed to synthesize instance of type class
OfNat 3
numerals are polymorphic in Lean, but the numeral `3` cannot be used in a context where the expected type is
due to the absence of the instance above
Hint: Type class instance resolution failures can be inspected with the `set_option trace.Meta.synthInstance true` command.
-/
#guard_msgs in example : := 3
/--
@ +0:45...62
error: Function expected at
Result
but this term has type
?m.1
Note: Expected a function because this term is being applied to the argument
String
Hint: The identifier `Result` is unknown, and Lean's `autoImplicit` option causes an unknown identifier to be treated as an implicitly bound variable with an unknown type. However, the unknown type cannot be a function, and a function is what Lean expects here. This is often the result of a typo or a missing `import` or `open` statement.
Perhaps you meant `Except` in place of `Result`?
-/
#guard_msgs (positions := true) in example : Result String Nat := .ok 3
/--
@ +0:45...62
error: Function expected at
Either
but this term has type
?m.1
Note: Expected a function because this term is being applied to the argument
String
Hint: The identifier `Either` is unknown, and Lean's `autoImplicit` option causes an unknown identifier to be treated as an implicitly bound variable with an unknown type. However, the unknown type cannot be a function, and a function is what Lean expects here. This is often the result of a typo or a missing `import` or `open` statement.
Perhaps you meant one of these in place of `Either`:
• `Sum`
• `Except`
-/
#guard_msgs (positions := true) in example : Either String Nat := .ok 3