Leonardo de Moura
5e0121c8dc
feat: add f!<interpolated string> macro for Format
2020-10-16 15:29:15 -07:00
Sebastian Ullrich
a3f216967e
fix: make Format.be tail recursive again
2020-10-14 17:23:51 +02:00
Sebastian Ullrich
d3463ef091
fix: break grouped fill items containing hard line breaks
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
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
Leonardo de Moura
3e4bfe9a85
fix: missing coercion for new frontend
2020-10-10 07:07:14 -07:00
Sebastian Ullrich
be7a3b76eb
feat: Format.fill
2020-10-07 15:30:36 +02:00
Sebastian Ullrich
df16221013
fix: Format.be: properly re-evaluate flattening after hard line break
2020-10-07 11:03:44 +02:00
Sebastian Ullrich
1fc1c55ed2
refactor: Format.be: explicit WorkItem structure
2020-10-07 10:09:05 +02:00
Sebastian Ullrich
3030c1ef7a
fix: Format.merge
2020-10-07 09:44:04 +02:00
Sebastian Ullrich
02001971c6
feat: Format: allow negative indentation to cancel out undesired automatic indentation
2020-10-07 09:44:04 +02:00
Sebastian Ullrich
98b3251fd3
feat: Format.pretty: support hard line breaks
2020-10-07 09:43:05 +02:00
Sebastian Ullrich
c3ebb6ad1f
fix: Format.group ignored preceding content on line
2020-10-07 09:43:05 +02:00
Sebastian Ullrich
31a2761bec
perf: make Format.group a constructor, flatten on the fly
2020-10-07 09:43:05 +02:00
Sebastian Ullrich
7154c2380b
refactor: simplify Format.SpaceResult
2020-10-07 09:43:05 +02:00
Sebastian Ullrich
b4ea61e79d
fix: NameSet.insert return type
2020-09-29 07:59:22 -07:00
Sebastian Ullrich
97a2198fe0
feat: change default indent width from 4 to 2 spaces
2020-09-18 13:15:40 -07:00
Sebastian Ullrich
4f5b59ad02
feat: pretty print shortened names (export/open/namespace/private)
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
650e836ab3
fix: pp internal names
2020-09-17 08:12:28 -07:00
Leonardo de Moura
0abca5475f
refactor: move ppExpr to IO
...
@Kha I am also tracking `currNamespace` and `openDecls`.
BTW, I also tried an experiment where I added `currNamespace` and
`openDecls` to `Meta.Context`, but it looked weird. This information
is only needed in the elaborator and pretty printer.
The `PPContext` object should contain everything you need. You
can put `currNamespace` and `openDecls` in the `Delaborator.Context`.
2020-09-15 18:48:21 -07:00
Leonardo de Moura
c8a4252461
refactor: move OpenDecl to Data
2020-09-15 16:53:53 -07:00
Leonardo de Moura
98a8867d90
chore: add coercions for new frontend
2020-09-13 12:00:32 -07:00
Leonardo de Moura
b025c1c623
chore: remove HasEmptyc workarounds
2020-09-11 14:28:42 -07:00
Sebastian Ullrich
7083aeea83
chore: adapt to upstream
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
bbcc718c8d
chore: more server fixes
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
7b9363c828
refactor: simplify document storage in server
2020-08-31 06:50:01 -07:00
Sebastian Ullrich
94084557cd
perf: allocation-free UTF-16 position computation
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
ab27e607d6
fix: LSP utility bugs
2020-08-31 06:50:01 -07:00
Sebastian Ullrich
d33b5a8ea6
chore: remove confusing comment
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
7a7a14c8b9
chore: no leading commas
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
4356017035
chore: copyright
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
23feb04d60
chore: clean up LSP code style and add more definitions from the spec
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
e9607d3095
chore: rename Structured and Structure
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
86968b5c45
feat: fix UTF-8/16 and add ServerM monad
...
Emojis work now 🎉
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
58551721ee
chore: namespaces
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
e1db04d347
feat: more robust snapshot-based recompilation
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
e137fa780f
feat: WIP snapshots
...
Allow interactive editing by only recompiling parts of the file below the edit.
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
0405fde21f
feat: handle hovers with null replies
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
a4cb8249d9
chore: fixup after rebase
2020-08-31 06:50:01 -07:00
Marc Huisinga
1b3d254dd0
feat: add emptyEnv and add initSearchPath temporarily so that server binary finds LEAN_PATH
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
86582ac73c
feat: edits seem to work now
2020-08-31 06:50:01 -07:00
Wojciech Nawrocki
46803ca25b
feat: working diagnostics (modulo line numbers)
2020-08-31 06:50:01 -07:00
Marc Huisinga
e7b3d0be59
feat: initial server implementation
2020-08-31 06:50:01 -07:00
Leonardo de Moura
1103806ff4
refactor: HasMonadLift ==> MonadLift
2020-08-25 13:54:41 -07:00
Leonardo de Moura
b672f0820b
chore: remove workarounds
2020-08-23 19:56:01 -07:00
Leonardo de Moura
77b9445544
feat: real ST monad
...
@Kha: the new `ST` (and `EST`) are escapable like the Haskell ST monad.
It makes `StateRefT` much more useful because we can now run it from pure
code.
2020-08-23 12:15:32 -07:00
Leonardo de Moura
5ffbada3df
feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
...
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.
cc @Kha
2020-08-22 16:00:43 -07:00