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
Joachim Breitner
60096e7d15
refactor: more idiomatic syntax for if h: ( #5567 )
...
https://github.com/leanprover/lean4/pull/5552 introduced a fair number
of `if h:`, but the slightly preferred style is `if h :`, with a space,
so here goes a quick `sed`.
2024-10-01 15:23:54 +00:00
TomasPuverle
ddec5336e5
chore: switch obvious cases of array "bang"[]! indexing to rely on hypothesis ( #5552 )
...
Update certain uses of `arr[i]!` to use the "provably correct" version
`arr[i]`, in order to use "best practices".
Some motivation and discussion on
[Zulip](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Lean.20compiler.2Felaborator.20development.20question/near/472934715 )
2024-10-01 11:12:22 +00:00
Henrik Böving
23e49eb519
perf: add prelude to all Lean modules
2024-02-18 14:55:17 -08:00
Leonardo de Moura
a87f0e25de
feat: add compiler.checkTypes for sanity checking
2022-11-13 17:45:21 -08:00
Leonardo de Moura
b4d13a8946
refactor: LetExpr => LetValue
...
We use "let value" in many other places in the code base.
2022-11-07 18:51:07 -08:00
Leonardo de Moura
2e8150e50d
chore: port Check.lean
2022-11-07 16:18:36 -08:00
Leonardo de Moura
7e2c476a77
chore: port more files to new LCNF
2022-11-07 16:18:36 -08:00
Henrik Böving
a608532fd4
chore: Improve LCNF check goto error message
2022-10-21 17:35:40 -07:00
Leonardo de Moura
886ed9b2e3
fix: remove function expected error at LCNF
2022-10-13 06:16:25 -07:00
Leonardo de Moura
bc2b891e7e
refactor: remove type compatibility sanity checks at LCNF Check.lean
...
See new note at `Check.lean` for details.
2022-10-13 06:01:41 -07:00
Leonardo de Moura
73ee2d92aa
fix: constructor parameter validation for mono phase
2022-10-06 06:57:06 -07:00
Leonardo de Moura
913ca41129
refactor: merge lcAny and lcErased
...
`lcErased` is a superset of `lcAny` anyway, and we didn't find ways of
using the distinction to generate better code.
2022-10-05 04:46:52 -07:00
Leonardo de Moura
e5494e7a49
fix: eta-expansion at compatibleTypes
...
It fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Annoying.20LCNF.20errors/near/301424293
2022-09-29 11:02:06 -07:00
Leonardo de Moura
f721e44718
fix: simplify compatibleTypes
...
Add note about "erasure confusion" in LCNF.
2022-09-22 15:15:32 -07:00
Leonardo de Moura
a2bcb3b73e
fix: erase propositon formers, add isErasedCompatible, remove approx. from compatibleTypes
2022-09-21 20:47:02 -07:00
Leonardo de Moura
c1b7accd12
refactor: LCNF local context
...
The previous implementation had a few issues:
- Function (and join point) declarations were being inserted into two different hashmaps.
- `borrow` information was not available for parameters.
- No proper erase functions.
2022-09-14 19:25:16 -07:00
Leonardo de Moura
54f1193739
chore: add maybeTypeFormerType
2022-09-11 20:19:44 -07:00
Leonardo de Moura
f0d75258ae
feat: treat erased arguments as fixed arguments
...
It also renames `Lean.Expr.erased` => `Lean.Expr.isErased`
2022-09-11 20:19:44 -07:00
Leonardo de Moura
85851d0c43
fix: bug at PullFunDecls
2022-09-06 17:15:56 -07:00
Leonardo de Moura
abd37d8fd1
feat: check binder names at LCNF/Check.lean
2022-09-04 16:55:42 -07:00
Leonardo de Moura
61edf19334
fix: allow LCNF discriminant to have any type
2022-09-01 20:52:08 -07:00
Leonardo de Moura
cedf9e980b
feat: check LCNF parameters
2022-09-01 07:17:53 -07:00
Leonardo de Moura
9874ef3c66
feat: check whether LetDecl and FunDecl match their values in the LCNF local context
2022-09-01 07:05:07 -07:00
Leonardo de Moura
c201133d4d
feat: LCNF local context dead variable checker
...
This commit also fixes a few local declaration leaks.
2022-08-31 21:07:21 -07:00
Siddharth Bhat
a7b128fee1
doc: explanations for LCNF.
2022-08-29 07:17:25 -07:00
Leonardo de Moura
65f9344f01
feat: check whether join points are fully applied at Check.lean
2022-08-25 18:17:54 -07:00
Leonardo de Moura
8102e1e31b
fix: jp case at check
2022-08-24 11:50:00 -07:00
Leonardo de Moura
f5415b2f81
feat: add Decl.check
2022-08-23 13:11:42 -07:00
Leonardo de Moura
bce7eadfbc
feat: add LCNF/Check.lean
2022-08-23 08:50:59 -07:00