Cameron Zwarich
c54287fb0d
feat: add proper erasure of type dependencies in LCNF ( #6678 )
...
This PR modifies LCNF.toMonoType to use a more refined type erasure
scheme, which distinguishes between irrelevant/erased information
(represented by lcErased) and erased type dependencies (represented by
lcAny). This corresponds to the irrelevant/object distinction in the old
code generator.
2025-01-21 02:07:16 +00: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
Joachim Breitner
1a12f63f74
refactor: move Synax.hasIdent, shake dependencies ( #4766 )
...
I noticed that a change to `Lean.PrettyPrinter.Delaborator.Builtins`
rebuilt more modules than I expected, so I moved a definition and
reduced some dependcies.
More reduction would be possible to move const-delaboration out of the
big `Lean.PrettyPrinter`, and import from `Lean.PrettyPrinter`
selectively.
2024-07-16 21:19:26 +00:00
Henrik Böving
23e49eb519
perf: add prelude to all Lean modules
2024-02-18 14:55:17 -08:00
Leonardo de Moura
9b02f982e2
chore: add ppCode'
2022-11-10 08:07:35 -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
f342d0ea35
fix: avoid unnecessary whitespace at LCNF pretty printer
2022-11-07 16:18:36 -08:00
Leonardo de Moura
46d83f2d80
fix: unnecessary paren at ppArg
2022-11-07 16:18:36 -08:00
Leonardo de Moura
2328cf2fb4
feat: add ppLetExpr
2022-11-07 16:18:36 -08:00
Leonardo de Moura
67e2735f07
chore: display LCNF unreachable type when pp.all is true
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
Leonardo de Moura
ec59bbe15c
chore: ensure LCNF pretty printer result supports Format.group
2022-10-16 16:06:08 -07:00
Leonardo de Moura
b20e208867
chore: pretty print LCNF cases result type
2022-10-09 20:13:17 -07:00
Leonardo de Moura
c14d07fe2e
feat: include def/fun/jp resulting type in the LCNF pretty printer
2022-10-09 12:10:11 -07:00
Leonardo de Moura
dc6f635f41
refactor: add LCNF/Internalize.lean
2022-10-03 09:18:11 -07:00
Leonardo de Moura
f7a1429cfd
feat: improve ppDecl'
2022-09-24 18:09:43 -07:00
Leonardo de Moura
111f6a319c
feat: add ppDecl'
...
It is useful for debugging purposes when we want to pretty print a
declaration before internalizing it.
2022-09-20 16:55:11 -07:00
Leonardo de Moura
631c216bab
fix: LCNF pretty printer missing parens
2022-09-20 15:51:32 -07:00
Leonardo de Moura
abe1f7f6f9
feat: dependency collector for the code specializer
2022-09-15 19:55:37 -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
613523e1f6
feat: store borrow flag at Param
...
It is more robust that using `Expr.mdata`, and we save the information at `toLCNF`.
2022-09-11 20:19:44 -07:00
Leonardo de Moura
3a2758a59b
refactor: new LCNF frontend
2022-08-24 11:40:37 -07:00
Leonardo de Moura
cabcadf9cc
feat: add ppDecl
2022-08-24 08:41:45 -07:00
Leonardo de Moura
6e068bebd1
feat: LCNF pretty printer
2022-08-24 08:16:00 -07:00