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
Sebastian Ullrich
43caef0130
fix: parenthesizer
2020-06-13 11:13:37 +02:00
Leonardo de Moura
17b6957f6c
chore: fix tests
2020-05-26 15:05:01 -07:00
Sebastian Ullrich
9247911e09
fix: basic parenthesizer approach, document
2020-05-26 11:26:57 +02:00
Sebastian Ullrich
386c706f3e
feat: basic parenthesizer
2020-05-04 14:28:36 -07:00