Mario Carneiro
85119ba9d1
chore: move Std.* data structures to Lean.*
2022-09-26 05:46:04 -07:00
E.W.Ayers
c8fc371eb9
fix: test
2022-06-17 17:47:51 -07:00
E.W.Ayers
2fe933cdf5
refactor: make SubExpr.Pos a definition
...
Instead of an abbreviation. It is easier to understand
Pos operations in terms of 'push' and 'pop' rather than
through arithmetic.
2022-06-17 17:47:51 -07:00
Leonardo de Moura
55989c25fc
chore: remove unnecessary args
2022-04-07 18:19:15 -07:00
Leonardo de Moura
e3241e82bc
feat: define PointedType as { α : Type u // Nonempty α }
2022-01-14 20:36:51 -08:00
Gabriel Ebner
50abc3e295
fix: correctly pretty-print @Eq
2022-01-12 09:41:41 +01:00
Leonardo de Moura
483f32edd8
feat: in pure code, do use assume Id monad at do notation
...
This feature produced counterintuitive behavior and confused users.
See discussion at #770 .
As pointed out by @tydeu, it is not too much work to write `Id.run <|`
before the `do` when we want to use the `do` notation in pure code.
closes #770
2021-12-10 12:55:14 -08:00
Sebastian Ullrich
3b43ab47f1
fix: formatter: check for comment tokens
...
Fixes #624
2021-08-11 17:37:18 +02:00
Daniel Selsam
0118c47117
refactor: separate pp.funBinderTypes and pp.piBinderTypes
2021-08-09 16:13:40 +02:00
Leonardo de Moura
76cc99179d
fix: fixes #370
2021-08-06 12:52:23 -07:00
Sebastian Ullrich
1dfacb5f84
fix: parenthesizer: respect lhsPrec
...
Fixes #595
2021-08-03 15:22:08 +02:00
Daniel Selsam
3fa992c684
feat: new pp.analyze.knowsType option
2021-08-03 09:13:18 +02:00
Daniel Selsam
7576b1dad1
chore: fix test hardcoding position offset
2021-08-03 09:13:18 +02:00
Daniel Selsam
89364b802b
feat: top-down heuristic delaboration
2021-08-03 09:13:18 +02:00
Wojciech Nawrocki
f51b80060d
feat: generic tagged Format
2021-08-01 09:58:44 +02:00
Leonardo de Moura
f4a7ffd8c8
chore: fix codebase and tests
2021-06-29 17:14:52 -07:00
Leonardo de Moura
90a79a0b06
chore: remove command universes
...
Now, `universe` may declare many universes. The goal is to make it
consistent with the `variable` command
2021-06-29 17:01:07 -07:00
Sebastian Ullrich
1490d095a8
fix: delaborator: bind without lambda
2021-02-16 12:07:46 +01:00
Sebastian Ullrich
4772fb5849
feat: delaborator: use ∀ if prop
2021-02-02 13:54:34 +01:00
Leonardo de Moura
c524bcf2d3
feat: improve universe level pretty printer
2020-12-21 07:34:48 -08:00
Leonardo de Moura
15335efae2
refactor: move Format to Init package
...
We are going to use it to define `Repr` class.
2020-12-18 11:21:30 -08:00
Leonardo de Moura
06ad52575a
feat: force users to use discard when action result is not being bound and it is not PUnit
...
After this commit, we have to use an explicit `discard` in code such as
```
def g (x : Nat) : IO Nat := ...
def f (x : Nat) : IO Unit := do
discard <| g x -- type error without the `discard`
IO.println x
```
Motivation: prevent users from making mistakes such as
```
def f (xs : Array Nat) : IO Unit := do
xs.set! 0 1
IO.println xs
```
when they meant to write
```
def f (xs : Array Nat) : IO Unit := do
let xs := xs.set! 0 1
IO.println xs
```
2020-12-08 06:14:48 -08:00
Leonardo de Moura
9d304df757
feat: heterogeneous Append experiment
...
@Kha This one required a bunch of manual fixes. The main issue is that
before we added the string interpolation feature, we created
`MessageData`s using `++` and coercions. For example, given
`(e : Expr)`, we would write
```
let msg : MessageData := "type: " ++ e
```
and rely on the coercions `String -> MessageData` and
`Expr -> MessageData`, and the instance `Append MessageData`.
However, heterogeneous operators "block" the expected type propagation downwards.
This kind of code is obsolete now since we can write a more compact
version using string interpolation
```
let msg := m!"type: {e}"
```
2020-12-01 16:32:41 -08:00
Sebastian Ullrich
f6816a0ffa
refactor: move & split Lean.Delaborator
2020-11-30 13:52:46 +01:00
Sebastian Ullrich
de20b14366
feat: delaborate basic do
...
/cc @leodemoura
2020-11-25 16:00:56 +01:00
Leonardo de Moura
a8c791ecae
chore: remove dead files and functions
...
Remove obsolete combinators: `whenM`, `unlessM`, and `condM`
cc @Kha
2020-11-10 18:37:15 -08:00
Leonardo de Moura
10c32fcf94
chore: HasToString => ToString
2020-10-27 16:11:48 -07:00
Leonardo de Moura
db9e390b4d
chore: remove new_frontend from tests
2020-10-25 09:16:38 -07:00
Leonardo de Moura
d6db541366
chore: cleanup
2020-09-28 19:05:48 -07:00
Leonardo de Moura
8e81db0d2b
chore: add temporary workaround to tests
...
We will remove it after we implement `doMatch`
2020-09-27 06:58:10 -07:00
Leonardo de Moura
a0a724ddbd
fix: tests and elabDo
2020-09-26 19:12:01 -07:00
Sebastian Ullrich
eae32b08a6
fix: pretty printing multiple universe levels
...
Fixes #190
2020-09-25 20:06:18 +02:00
Sebastian Ullrich
ac6c2b7a8e
feat: formatter: interpret space after token as soft space
2020-09-18 13:15:40 -07:00
Sebastian Ullrich
131f30f7a9
feat: pretty print tuples
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
27d936ffa5
feat: pretty print structure instances
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
4f5b59ad02
feat: pretty print shortened names (export/open/namespace/private)
2020-09-17 08:12:28 -07:00
Leonardo de Moura
32e26799ed
chore: move more tests to new frontend
2020-09-13 13:28:12 -07:00
Leonardo de Moura
a8de3c5115
fix: isDefEq configuration in the elaborator
2020-09-11 17:36:28 -07:00
Leonardo de Moura
813a964767
refactor: move polymorphic Meta methods back to Meta namespace
2020-08-25 14:57:58 -07:00
Leonardo de Moura
14f973d5a0
chore: fix tests
2020-08-24 17:59:11 -07:00
Leonardo de Moura
fab100abb4
chore: fix tests
2020-08-24 12:17:47 -07:00
Sebastian Ullrich
786d90ac80
refactor: move parenthesizer and formatter into CoreM
...
/cc @leodemoura
2020-08-21 14:23:58 +02:00
Leonardo de Moura
44f5182f76
chore: fix tests
...
We have removed `MetaIO`. We use use `CoreM` instead.
2020-08-20 15:56:29 -07:00
Leonardo de Moura
bd7a7ed623
refactor: reduce ref plumbing
...
TODO: reduce `ref` plumbing at `CommandElabM`
2020-08-12 20:23:02 -07:00
Sebastian Ullrich
1f4cc130b7
feat: precompile parenthesizers instead of interpreting them
2020-08-12 09:15:59 -07:00
Sebastian Ullrich
1d725f7c83
feat: almost activate new pretty printer by default
2020-08-06 09:27:12 -07:00
Sebastian Ullrich
6a8048fb97
test: formatter: check for round-trip through parser
2020-08-06 09:27:12 -07:00
Sebastian Ullrich
33a963d82b
refactor: make formatter stack-based, much like the parser
2020-08-06 09:27:12 -07:00
Sebastian Ullrich
1fe192802b
fix: parenthesizer
2020-07-29 15:18:00 +02:00
Leonardo de Moura
cbb14673ef
chore: move RBTree and RBMap to Std
2020-06-25 13:26:16 -07:00