@@ -23,7 +23,7 @@ error: Invalid field `test0`: The environment does not contain `String.test0`, s
2323of type `String`
2424
2525Hint: Perhaps you meant `String.foo` in place of `String.test0`:
26- "abc" .t̵e̵s̵t̵0̵f̲o̲o̲
26+ .t̵e̵s̵t̵0̵f̲o̲o̲
2727-/
2828#guard_msgs in
2929#check "abc" .test0
@@ -44,8 +44,8 @@ error: Invalid field `test1`: The environment does not contain `String.test1`, s
4444of type `String`
4545
4646Hint: Perhaps you meant one of these in place of `String.test1`:
47- [ apply ] `String.foo`: "abc".foo
48- [ apply ] `String.baz`: "abc".baz
47+ [ apply ] `String.foo`
48+ [ apply ] `String.baz`
4949-/
5050#guard_msgs in
5151#check "abc" .test1
@@ -67,9 +67,9 @@ error: Invalid field `test2`: The environment does not contain `String.test2`, s
6767of type `String`
6868
6969Hint: Perhaps you meant one of these in place of `String.test2`:
70- [ apply ] `String.foo`: "abc".foo
71- [ apply ] `String.baz`: "abc".baz
72- [ apply ] `String.bar`: "abc".bar
70+ [ apply ] `String.foo`
71+ [ apply ] `String.baz`
72+ [ apply ] `String.bar`
7373-/
7474#guard_msgs in
7575#check "abc" .test2
@@ -119,7 +119,7 @@ error: Invalid field `toNum`: The environment does not contain `Foo.Bar.toNum`,
119119of type `Foo.Bar`
120120
121121Hint: Perhaps you meant `Foo.Bar.toNat` in place of `Foo.Bar.toNum`:
122- Foo.Bar.three .t̵o̵N̵u̵m̵t̲o̲N̲a̲t̲
122+ .t̵o̵N̵u̵m̵t̲o̲N̲a̲t̲
123123-/
124124#guard_msgs in
125125#eval Foo.Bar.three.toNum
@@ -130,7 +130,7 @@ error: Invalid field `toStr`: The environment does not contain `Foo.Bar.toStr`,
130130of type `Foo.Bar`
131131
132132Hint: Perhaps you meant `Foo.Bar.toString` in place of `Foo.Bar.toStr`:
133- Foo.Bar.two .t̵o̵S̵t̵r̵t̲o̲S̲t̲r̲i̲n̲g̲
133+ .t̵o̵S̵t̵r̵t̲o̲S̲t̲r̲i̲n̲g̲
134134-/
135135#guard_msgs in
136136#eval Foo.Bar.two.toStr
@@ -274,7 +274,35 @@ error: Invalid field `not`: The environment does not contain `MyBool.not`, so it
274274of type `MyBool`
275275
276276Hint: Perhaps you meant `MyBool.swap` in place of `MyBool.not`:
277- MyBool.tt .n̵o̵t̵s̲w̲a̲p̲
277+ .n̵o̵t̵s̲w̲a̲p̲
278278-/
279279#guard_msgs in
280280example := MyBool.tt.not
281+
282+ /--
283+ error: Invalid field `not`: The environment does not contain `MyBool.not`, so it is not possible to project the field `not` from an expression
284+ (fun x => if x < 3 then MyBool.tt else MyBool.ff) 4
285+ of type `MyBool`
286+
287+ Hint: Perhaps you meant `MyBool.swap` in place of `MyBool.not`:
288+ .n̵o̵t̵s̲w̲a̲p̲
289+ -/
290+ #guard_msgs in
291+ example := ((fun x => if x < 3 then MyBool.tt else .ff) 4 ).not
292+
293+
294+ @[suggest_for MyBool.not]
295+ def MyBool.justFalse : MyBool → MyBool
296+ | _ => ff
297+
298+ /--
299+ error: Invalid field `not`: The environment does not contain `MyBool.not`, so it is not possible to project the field `not` from an expression
300+ (fun x => if x < 3 then MyBool.tt else MyBool.ff) 4
301+ of type `MyBool`
302+
303+ Hint: Perhaps you meant one of these in place of `MyBool.not`:
304+ [ apply ] `MyBool.justFalse`
305+ [ apply ] `MyBool.swap`
306+ -/
307+ #guard_msgs in
308+ example := ((fun x => if x < 3 then MyBool.tt else .ff) 4 ).not
0 commit comments