Leonardo de Moura
caac09b33e
fix: forgot to reset params on block following joinpoint declaration
2020-10-14 07:41:35 -07:00
Sebastian Ullrich
d3463ef091
fix: break grouped fill items containing hard line breaks
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
2ccd382e6f
refactor: formatter: remove unnecessary concatenation
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
1f772aaa6c
fix: Format.be: count space in front of fill item
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
af78e6cc18
refactor: Format.be: reuse pushGroup in line case
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
8c2953400d
perf: formatter: smaller Format objects
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
78ffc72150
chore: remove ppGroups beneficial only for group but not fill
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
381db5265a
refactor: monadify Format.be
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
121b956bb4
refactor: make more internal Format stuff private
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
7e5cd0d171
fix: Format.be: respect indent when trying to fit fill item in a new line
2020-10-14 14:24:47 +02:00
Sebastian Ullrich
88af639346
feat: Formatter: default to Format.fill instead of Format.group
2020-10-14 14:24:47 +02:00
Leonardo de Moura
08061137a8
chore: move to new frontend
2020-10-13 19:00:40 -07:00
Leonardo de Moura
1f09fc2c77
chore: move to new frontend
2020-10-13 17:18:15 -07:00
Leonardo de Moura
b7658ef91f
chore: move to new frontend
2020-10-13 17:11:52 -07:00
Leonardo de Moura
d3a22397b4
chore: move to new frontend
2020-10-13 16:38:25 -07:00
Leonardo de Moura
91ae7a274a
chore: cleanup
2020-10-13 16:25:06 -07:00
Leonardo de Moura
faeba23099
chore: cleanup
2020-10-13 16:09:00 -07:00
Leonardo de Moura
c1dccb8154
feat: stx[i] as notation for stx.getArg i
2020-10-13 15:48:39 -07:00
Leonardo de Moura
427a3610c3
chore: move to new frontend
2020-10-13 15:36:39 -07:00
Leonardo de Moura
9af0a0e18b
feat: add withReader method
...
@Kha `withReader` is a well-behaved version of `adaptReader`. `adaptReader` is
too general, and it often produces counterintuitive elaboration
errors.
Here are two super annoying issues I hit all the time:
1- `adaptReader` + polymorphic code
```
def ex1 : ReaderT Nat IO Unit :=
adaptReader (fun x => x + 1) $
IO.println "foo" -- 3 Errors here failed to synthesize `Monad ?m` and `MonadIO ?m`, and don't know how to synthesize `Type → Type`
```
2- `adaptReader` and notation that requires the expected type
```
structure Context :=
(x y : Nat)
def ex2 : ReaderT Context IO Nat :=
adaptReader (fun s => { s with x := 10 }) $ -- Error at the structure instance
...
```
In the example above, I have to write `fun (s : Context) => ...` to
fix the problem.
The two problems above happen in the old and new frontends. However,
there is a new problem specific for the new frontend. In the new
frontend, a `do` is only elaborated when the expected type is known.
So, `adaptReader (fun ctx => ...) do ...` seldom works :(
As I said above, the issue is that `adaptReader` is too general. Its
type is
```
{ρ ρ' : Type u_1} → {m m' : Type u_1 → Type u_2} → [MonadReaderAdapter ρ ρ' m m'] → {α : Type u_1} → (ρ' → ρ) → m α → m' α
```
`withReader` is a simpler version of `adaptReader`
```
withReader : {ρ : Type u_1} → {m : Type u_1 → Type u_2} → [MonadWithReader ρ m] → {α : Type u_1} → (ρ → ρ) → m α → m α
```
It doesn't have any of the problems above. Moreover, I managed to replace
every single instance of `adaptReader` with `withReader` at the stdlib
and tests. We don't need the `adaptReader` generality.
2020-10-13 15:00:17 -07:00
Leonardo de Moura
4fce06c468
chore: move to new frontend
2020-10-13 14:13:33 -07:00
Leonardo de Moura
d10b95d2ad
chore: move to new frontend
2020-10-13 13:23:35 -07:00
Leonardo de Moura
77ce42548b
fix: add nonReservedSymbol
2020-10-13 12:52:18 -07:00
Leonardo de Moura
d2e5c1c300
feat: improve dbgTrace! macro
2020-10-13 12:38:04 -07:00
Leonardo de Moura
bdb92ce7a4
feat: add throwError! macro and improve trace[..]! macro
2020-10-13 12:32:33 -07:00
Leonardo de Moura
39f6aae306
fix: interpolatedStrFn
2020-10-13 12:19:10 -07:00
Leonardo de Moura
0c626f3e5d
chore: move to new frontend
...
chore: cleanup
2020-10-13 12:00:20 -07:00
Leonardo de Moura
8c5826661c
chore: remove workaround
2020-10-13 09:54:59 -07:00
Leonardo de Moura
ca0b11137a
chore: add ShareCommonM.run, and remove workaround
2020-10-13 09:29:10 -07:00
Leonardo de Moura
0889293a2c
chore: move to new frontend
2020-10-13 07:57:42 -07:00
Sebastian Ullrich
f9f723566f
chore: emit initializers as static
2020-10-13 05:54:44 -07:00
Leonardo de Moura
b76a1dd556
chore: move to new frontend
2020-10-12 17:27:58 -07:00
Leonardo de Moura
d0bcb43c33
feat: improve Structural.lean
2020-10-12 16:58:30 -07:00
Leonardo de Moura
07254fc71b
fix: checkIsDefinition
...
For '[inline] partial' definitions in mutual blocks.
2020-10-12 15:57:39 -07:00
Leonardo de Moura
c1f2635391
chore: move to new frontend
2020-10-12 15:28:41 -07:00
Leonardo de Moura
4df4ec809a
chore: move to new frontend
2020-10-12 12:10:51 -07:00
Leonardo de Moura
67e9c83f54
fix: for result type
2020-10-12 11:01:59 -07:00
Leonardo de Moura
611c77f7e9
chore: move file to new frontend
2020-10-12 11:01:59 -07:00
Leonardo de Moura
7c6b10012b
chore: add helper function
2020-10-11 19:58:07 -07:00
Leonardo de Moura
8555cbaace
fix: export command for new frontend
2020-10-11 19:44:43 -07:00
Leonardo de Moura
cce9d57d5a
chore: port files to new frontend
2020-10-11 19:39:11 -07:00
Leonardo de Moura
dc670bfd5d
fix: handle optParam at consumeImplicits
...
`consumeImplicits` is used during LVal resolution.
2020-10-11 15:26:10 -07:00
Leonardo de Moura
7a8fb1b66c
chore: remove workaround
...
`elabAppArgsAux` has been improved in the previous commit.
2020-10-11 15:08:12 -07:00
Leonardo de Moura
fda1d7b213
refactor: elabAppArgsAux
...
It also adds better support for opt/auto params and named arguments.
2020-10-11 15:08:12 -07:00
Leonardo de Moura
cd20e2ef8d
chore: use interpolated string
2020-10-11 15:08:12 -07:00
Leonardo de Moura
a53ab799d9
chore: remove workaround
2020-10-10 16:20:44 -07:00
Leonardo de Moura
c5e3da89e8
fix: (try to) postpone when discriminant type is not known
2020-10-10 16:16:22 -07:00
Leonardo de Moura
7fec9587db
fix: dollarProj notation bug
2020-10-10 13:38:07 -07:00
Leonardo de Moura
069faf0a0a
chore: move ResolveName to new frontend
2020-10-10 13:03:46 -07:00
Leonardo de Moura
f84fa47566
fix: use resolveGlobalConstNoOverload at implementedBy attribute handler
2020-10-10 11:40:32 -07:00