Markus Himmel
fa67f300f6
chore: rename String.ValidPos to String.Pos ( #11240 )
...
This PR renames `String.ValidPos` to `String.Pos`, `String.endValidPos`
to `String.endPos` and `String.startValidPos` to `String.startPos`.
Accordingly, the deprecations of `String.Pos` to `String.Pos.Raw` and
`String.endPos` to `String.rawEndPos` are removed early, after an
abbreviated deprecation cycle of two releases.
2025-11-24 16:40:21 +00:00
Markus Himmel
2c2fcff4f8
refactor: do not use String.Iterator ( #11127 )
...
This PR removes all uses of `String.Iterator` from core, preferring
`String.ValidPos` instead.
In an upcoming PR, `String.Iterator` will be renamed to
`String.Legacy.Iterator`.
2025-11-11 11:46:58 +00:00
Sebastian Ullrich
e4fb780f8a
perf: remove unused argument to ExternEntry.opaque ( #11066 )
...
This used to create quite a few unique objects in public .olean
2025-11-03 17:26:32 +00:00
Henrik Böving
bd0b91de07
perf: reduce amount of symbols in DLLs ( #10864 )
...
This PR reduces the amount of symbols in our DLLs by cutting open a
linking cycle of the shape:
`Environment -> Compiler -> Meta -> Environment`
This is achieved by introducing a dynamic call to the compiler hidden
behind a `Ref` as previously
done in the pretty printer.
2025-10-21 09:00:56 +00:00
Sebastian Ullrich
428355cf02
chore: remove redundant imports in core ( #10750 )
2025-10-16 20:27:46 +00:00
Cameron Zwarich
737105fd78
chore: remove syntax for extern arity specifications ( #9556 )
2025-07-26 00:44:36 +00:00
Cameron Zwarich
eddc3b421e
chore: remove support for unused arity specification in ExternAttrData ( #9552 )
...
This just removes the data for this specification. Removing the parser
support for it seems to require a stage0 update in between.
2025-07-25 21:23:56 +00:00
Cameron Zwarich
7f39e56a79
chore: adopt List.find? in getExternEntryForAux ( #9550 )
2025-07-25 17:38:22 +00:00
Sebastian Ullrich
ff1d3138bf
refactor: module-ize Lean ( #9330 )
2025-07-25 12:02:51 +00:00
Rob23oba
e148871087
chore: fix spelling errors ( #9175 )
...
(Almost) only typos in constant names and doc-strings were considered;
grammar was not considered. Also, along others,
`mkDefinitionValInferrringUnsafe` has been fixed :-)
2025-07-24 23:35:32 +00:00
Cameron Zwarich
efe5e9a752
refactor: remove unnecessary export attributes ( #9281 )
2025-07-09 16:55:00 +00:00
Cameron Zwarich
d664b6b888
fix: move lean_add_extern implementation to Lean ( #9268 )
...
This PR moves the implementation of `lean_add_extern`/`addExtern` from
C++ into Lean. I believe is the last C++ helper function from the
library/compiler directory being relied upon by the new compiler. I put
it into its own file and duplicated some code because this function
needs to execute in CoreM, whereas the other IR functions live in their
own monad stack. After the C++ compiler is removed, we can move the IR
functions into CoreM.
2025-07-09 00:02:56 +00:00
Sebastian Ullrich
aadc74bee2
perf: do not import non-meta IR
2025-06-27 08:13:31 -07:00
Cameron Zwarich
bf1d253764
feat: add support for extern LCNF decls ( #6429 )
...
This PR adds support for extern LCNF decls, which is required for parity
with the existing code generator.
2024-12-20 21:20:56 +00:00
Leonardo de Moura
5f1c4df07d
feat: display diagnostic information at term and tactic set_option diagnostics true ( #4048 )
...
We don't need to include reduction info at `simp` diagnostic
information.
2024-05-01 22:47:57 +00:00
Leonardo de Moura
dc442ec137
fix: theorems should never be marked as extern ( #4018 )
2024-04-29 00:01:49 +00:00
Leonardo de Moura
9d14c0456b
feat: add set_option diag true for diagnostic counters ( #4016 )
...
It currently only reports how many times each declaration has been
unfolded, and how often the `isDefEq` heuristic for `f a =?= f b` has
been used. Only counters above the threshold are reported.
2024-04-28 22:14:08 +00:00
Henrik Böving
23e49eb519
perf: add prelude to all Lean modules
2024-02-18 14:55:17 -08:00
Mario Carneiro
dd5948d641
chore: snake-case attributes (part 1)
2022-10-19 09:28:08 -07:00
Leonardo de Moura
f1f5a4b39e
chore: naming convention
2022-07-24 17:44:29 -07:00
Mario Carneiro
f6211b1a74
chore: convert doc/mod comments from /- to /--//-! ( #1354 )
2022-07-22 12:05:31 -07:00
Leonardo de Moura
02c4e548df
feat: replace constant with opaque
2022-06-14 17:02:59 -07:00
Sebastian Ullrich
ae7b895f7a
refactor: unname some unused variables
2022-06-07 16:37:45 -07:00
Leonardo de Moura
0631c90794
feat: implement MonadLog at CoreM
2022-05-31 17:40:55 -07:00
Leonardo de Moura
c65537aea5
feat: Option is a Monad again
...
TODO: remove `OptionM` after update stage0
see: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Do.20we.20still.20need.20OptionM.3F/near/279761084
2022-05-04 15:27:42 -07:00
Leonardo de Moura
cf3b8d4eb4
chore: cleanup
...
Make the code style more uniform.
We still have a lot of leftovers from the old frontend.
2022-01-26 09:18:17 -08:00
Leonardo de Moura
b22a3a4cc4
feat: skip code generation for declarations marked with implementedBy, init, and builtinInit
...
This is a bit hackish. We should clean up when we rewrite the compiler
in Lean.
2022-01-14 19:20:16 -08:00
Leonardo de Moura
9a5f239513
refactor: remove Monad Option and Alternative Option
...
We should use `OptionM` instead.
`Option` still implements `Functor` and `OrElse`.
cc @Kha
2021-03-20 18:25:25 -07:00
Leonardo de Moura
be841a7cad
chore: throwError! => throwError, throwErrorAt! => throwErrorAt
...
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
164577d94e
chore: remove parser! and tparser!
...
The new macros are called "leading_parser` and `trailing_parser`.
cc @Kha
2021-03-11 09:36:58 -08:00
Leonardo de Moura
ed87480093
refactor: move to attr syntax category
2020-12-15 20:22:04 -08:00
Leonardo de Moura
f4db2f5971
fix: workaround for old frontend
2020-12-15 15:49:45 -08:00
Leonardo de Moura
baabfc13e0
chore: remove occurrences of Append.append
2020-12-01 15:44:03 -08:00
Leonardo de Moura
0869f38de4
chore: update structure, class, inductive
2020-11-27 15:09:30 -08:00
Leonardo de Moura
f67c93191f
feat: use |>.
2020-11-19 08:38:47 -08:00
Leonardo de Moura
c305c2691f
chore: use :=
2020-11-19 07:22:31 -08:00
Leonardo de Moura
2d2d39c78e
chore: use mut
2020-11-07 17:32:13 -08:00
Leonardo de Moura
898a08a0c1
chore: avoid Has prefix in type classes
...
closes #203
2020-10-27 18:29:19 -07:00
Leonardo de Moura
13c2a8ff51
chore: remove #lang lean4 header
2020-10-25 09:54:07 -07:00
Sebastian Ullrich
4e8f4fcaef
refactor: extract AttributeImplCore, introduce ParametricAttributeImpl
2020-10-22 11:59:55 +02:00
Leonardo de Moura
82ee2e361b
chore: cleanup
2020-10-21 18:43:47 -07:00
Leonardo de Moura
1495f403a1
chore: use builtin_initialize instead of initialize at src/Lean
2020-10-19 15:17:02 -07:00
Leonardo de Moura
d2803d13d3
chore: move to new frontend
2020-10-17 07:10:05 -07:00
Leonardo de Moura
217b7fc2b8
feat: improve extern arity calculation
2020-08-31 16:29:27 -07:00
Leonardo de Moura
5ffbada3df
feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
...
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.
cc @Kha
2020-08-22 16:00:43 -07:00
Leonardo de Moura
68a4c145f7
refactor: implement attribute hooks using CoreM
...
We were using a mix of `IO` and `Except`
2020-08-19 14:44:54 -07:00
Leonardo de Moura
249bda16c0
chore: remove prelude commands from Lean package
2020-06-25 11:21:17 -07:00
Leonardo de Moura
4ccc3fef52
chore: move Init.Lean files to Lean package
2020-05-26 15:04:35 -07:00