lean4-htt/src/Lean
Scott Morrison d4dca3baac
feat: test_extern command (#2970)
This adds a `test_extern` command.

Usage:
```
import Lean.Util.TestExtern

test_extern Nat.add 17 37
```

This:
* Checks that the head symbol has an `@[extern]` attribute.
* Writes down `t == t'`, where `t` is the term provided, and `t'` is the
reference implementation (specifically, `t` with the head symbol
unfolded).
* Tries to reduce this to `true`, and complains if this fails.

Note that the type of the term must have a `BEq` instance for this to
work: there's a self-explanatory error message if it isn't available.
2023-12-12 23:33:05 +00:00
..
Compiler fix: Escape ? in C literal strings to avoid trigraphs 2023-11-06 16:25:00 +01:00
Data fix: move Lean.List.toSMap to List.toSMap (#3035) 2023-12-12 01:01:24 +00:00
Elab chore: withLocation * should not fail if it closes the main goal (#2917) 2023-12-12 00:45:13 +00:00
Linter feat: Lean.Linter.logLintIf (#2852) 2023-11-09 23:00:34 +11:00
Meta chore: fix superfluous lemmas in simp.trace (#2923) 2023-12-11 23:51:31 +00:00
Parser feat: drop support for termination_by' (#3033) 2023-12-11 17:33:17 +00:00
ParserCompiler feat: hovers & name resolution in registerCombinatorAttribute 2022-10-23 09:30:38 +02:00
PrettyPrinter feat: pp.beta to apply beta reduction when pretty printing (#2864) 2023-11-24 12:26:31 +00:00
Server feat: per-package server options (#2858) 2023-11-26 13:42:38 +00:00
Util feat: test_extern command (#2970) 2023-12-12 23:33:05 +00:00
Widget fix: treat pretty-printed names as strings 2023-10-11 09:51:14 +02:00
Attributes.lean feat: add applicationTime to registerTagAttribute 2022-12-02 09:58:41 -08:00
AuxRecursor.lean feat: automatic extension names 2022-10-06 17:19:30 -07:00
Class.lean fix: fixes #1901 2022-12-01 08:39:06 -08:00
Compiler.lean
CoreM.lean fix: fixes #2775 2023-11-03 05:56:59 -07:00
Data.lean feat: allow configuring occs in rw 2023-09-13 12:03:18 -07:00
Declaration.lean feat: replay constants into an Environment (#2617) 2023-10-11 14:08:03 +11:00
DeclarationRange.lean feat: automatic extension names 2022-10-06 17:19:30 -07:00
DocString.lean feat: automatic extension names 2022-10-06 17:19:30 -07:00
Elab.lean perf: add parseImports' 2022-11-09 14:50:11 -08:00
Environment.lean perf: leak environments not freed before process exit 2023-11-14 17:33:04 +01:00
Eval.lean
Exception.lean fix: spacing and indentation fixes 2023-05-28 18:48:36 -07:00
Expr.lean doc: fix typos (#2996) 2023-11-30 10:16:33 +00:00
HeadIndex.lean
Hygiene.lean chore: fix typos in comments 2023-10-08 10:46:05 +02:00
ImportingFlag.lean doc: fix docstring typos (#2605) 2023-09-30 07:51:35 -04:00
InternalExceptionId.lean
KeyedDeclsAttribute.lean chore: use deriving Nonempty 2022-12-22 03:48:15 +01:00
LazyInitExtension.lean
Level.lean feat: add an OfNat instance for Level (#2880) 2023-11-20 09:14:16 +01:00
Linter.lean feat: add linter.deprecated option to silence deprecation warnings 2022-10-23 21:11:57 +02:00
LoadDynlib.lean
LocalContext.lean fix: FFI signature mismatches 2023-08-18 19:34:21 +02:00
Log.lean refactor: consolidate MessageData constructors into lazy formatting with infos 2022-12-07 19:16:25 +01:00
Message.lean feat: translate interrupted kernel exception 2023-10-26 08:33:09 +02:00
Meta.lean
MetavarContext.lean doc: fix MetavarContext markdown (#3026) 2023-12-06 08:15:45 +00:00
Modifiers.lean feat: automatic extension names 2022-10-06 17:19:30 -07:00
MonadEnv.lean
Parser.lean feat: hygieneInfo parser (aka this 2.0) 2023-06-02 16:19:02 +02:00
ParserCompiler.lean chore: generalize parser kind detection 2022-11-14 12:53:18 +01:00
PrettyPrinter.lean feat: signature pretty printer for hovers 2022-12-21 21:59:05 +01:00
ProjFns.lean feat: automatic extension names 2022-10-06 17:19:30 -07:00
ReducibilityAttrs.lean feat: automatic extension names 2022-10-06 17:19:30 -07:00
Replay.lean feat: replay constants into an Environment (#2617) 2023-10-11 14:08:03 +11:00
ResolveName.lean chore: fix typos in comments 2023-10-08 10:46:05 +02:00
Runtime.lean
ScopedEnvExtension.lean chore: snake-case attributes (part 2) 2022-10-19 09:28:08 -07:00
Server.lean feat: CodeActionProvider 2022-10-20 11:20:42 -07:00
Structure.lean feat: automatic extension names 2022-10-06 17:19:30 -07:00
SubExpr.lean doc: fix contradictory docstring 2023-07-19 10:53:47 +02:00
Syntax.lean fix: basic ident fallback in identComponents 2023-06-22 09:50:24 +01:00
ToExpr.lean feat: new ToExpr Name 2022-09-29 17:27:45 -07:00
Util.lean feat: test_extern command (#2970) 2023-12-12 23:33:05 +00:00
Widget.lean