Commit graph

725 commits

Author SHA1 Message Date
Gabriel Ebner
1524979dbf feat(emacs,shell/server): add different region-of-interest options 2017-03-23 08:57:56 +01:00
Gabriel Ebner
10e354952b feat(emacs): do not call auto-completion on tab 2017-03-23 08:57:56 +01:00
Gabriel Ebner
aebd18f136 feat(shell/server): only compile region of interest 2017-03-23 08:57:56 +01:00
Gabriel Ebner
595cbb8fe9 refactor(*): task<T>, log_tree, cancellation_token 2017-03-23 08:57:52 +01:00
Sebastian Ullrich
e0856284b0 feat(frontends/lean,emacs): tactic info before elaboration, fix many edge cases 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
421a6d6f01 feat(frontends/lean/interactive,emacs): highlight current tactic parameter 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
9b5e7ddcda feat(frontends/lean/interactive,emacs): hide colon separator in front of pretty-printed types 2017-03-17 18:20:44 -07:00
Leonardo de Moura
1b48d51cdd fix(emacs/lean-syntax): new transient commands 2017-03-09 20:41:35 -08:00
Leonardo de Moura
9d3c0497cb chore(frontends/lean): rename transient commands
See issue #1432
2017-03-09 18:41:19 -08:00
Leonardo de Moura
5fa7d765ac chore(emacs/lean-server): remove leftover from experiment 2017-02-28 22:57:20 -08:00
Leonardo de Moura
17556758cb feat(library/constructions,library/inductive_compiler): automatically generate dependent eliminator for inductive predicates
The dependent eliminator for an inductive predicate C is called C.drec

TODO: construct dcases_on and drec_on using C.drec

We need this recursor for implementing dependent elimination for
inductive predicates.

We don't need to define acc.drec and eq.drec in the standard library anymore.
2017-02-28 20:58:04 -08:00
Sebastian Ullrich
bea34eb936 fix(emacs/lean-debug): disable undo in lean-debug buffer 2017-02-21 10:55:15 -08:00
Gabriel Ebner
4ae9312a5f fix(emacs/lean-input): remove overloading of \b abbreviation 2017-02-21 10:54:19 -08:00
Sebastian Ullrich
260d8789d1 feat(emacs/lean-type): eldoc: always show doc string 2017-02-17 13:03:24 +01:00
Gabriel Ebner
2d31007625 fix(emacs): update flycheck messages for tasks 2017-02-11 10:50:11 -08:00
Gabriel Ebner
bd3ebdbeb1 fix(emacs): do not update flycheck together with tasks 2017-02-10 09:49:48 +01:00
Leonardo de Moura
01eb27d4a4 feat(util): "deterministic timeout" option
closes #1134

see #1362

This feature is implemented using a "hearbeat" thread local counter.
We reset the counter whenever we start a new task.
The counter is incremented when:

  1- An object is allocated using small_object_allocator (e.g., VM object)
  2- An object is allocated using memory_pool (e.g., expr, level, rb_tree nodes, list cons-cells, etc)
  3- check_system(...) invocations

We check if the threshold was reached at check_system.
The option --timeout=num can be used to set the limit (in thousands).
The default is unbounded in batch mode.
In server mode, the default is 100000. We can compile the standard library with --timeout=12000

I did not perform many experiments to check how precise this counter is.
I added a new Emacs configuration setting to change the server default.

Here is the wall clock time for different values of --timeout for the
command used on issue #1134

time ../../bin/lean -j 0 --timeout=20000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m1.070s
user	0m1.032s
sys	0m0.036s

time ../../bin/lean -j 0 --timeout=40000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m1.777s
user	0m1.676s
sys	0m0.044s

time ../../bin/lean -j 0 --timeout=50000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m1.985s
user	0m1.920s
sys	0m0.056s

time ../../bin/lean -j 0 --timeout=100000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m3.587s
user	0m3.564s
sys	0m0.020s
2017-02-07 13:56:12 -08:00
Gabriel Ebner
c58a440775 feat(emacs): add options to set memory limit and extra command-line arguments 2017-02-07 11:37:07 -08:00
Leonardo de Moura
30a1876fc8 feat(library/init/meta): add add_aux_decl and abstract tactics 2017-02-05 16:00:47 -08:00
Sebastian Ullrich
523a576bbe fix(emacs/lean-flycheck): typo 2017-02-04 13:50:22 -08:00
Gabriel Ebner
44a4b55c26 fix(emacs): keep transient marks in command hooks 2017-02-04 13:50:14 -08:00
Sebastian Ullrich
1bcdbf38bd feat(emacs/lean-flycheck): Next Error: show all errors at current or next position 2017-02-01 18:48:45 -08:00
Sebastian Ullrich
c3a655fdae fix(emacs/lean-server): check if current buffer is still there when handling response 2017-02-01 18:48:45 -08:00
Sebastian Ullrich
6eded75702 fix(emacs/lean-flycheck): show running tasks when highlighting disabled or not in current file 2017-02-01 18:48:45 -08:00
Leonardo de Moura
77a9feaf70 refactor(frontends/lean): PType ==> Sort
see #1341
2017-01-30 11:54:00 -08:00
Leonardo de Moura
bf9f7560f7 feat(frontends/lean): (Type u) can't be a proposition
(Type u)  is the old (Type (u+1))
(PType u) is the old (Type u)
Type*     is the old (Type (_+1))
PType*    is the old Type*

The stdlib can be compiled, but we still have > 70 broken tests

See discussion at #1341
2017-01-30 11:54:00 -08:00
Sebastian Ullrich
e8a387b724 fix(emacs/lean-info): do not update info windows during text selection
Fixes #1332
2017-01-25 18:33:19 -08:00
Sebastian Ullrich
3f65690706 feat(emacs/lean-server): print out entire server response on error 2017-01-19 17:50:36 -08:00
Sebastian Ullrich
cc1553d901 fix(emacs/lean-server): dump response before trying to parse it 2017-01-19 17:50:36 -08:00
Gabriel Ebner
ecdd17738d feat(emacs): add toggle for pending task highlight 2017-01-19 17:49:35 -08:00
Gabriel Ebner
bf20be51d5 chore(emacs/lean-server): put face into lean group for customization 2017-01-18 08:32:53 -08:00
Gabriel Ebner
be6b81db07 chore(emacs): remove lean-flycheck-use option 2017-01-18 08:32:53 -08:00
Gabriel Ebner
9b63ceff91 chore(emacs/lean-project): remove old project file contents 2017-01-18 08:32:53 -08:00
Gabriel Ebner
9530a7db1c chore(emacs): remove unused options 2017-01-18 08:32:53 -08:00
Gabriel Ebner
c601b9c7bd fix(emacs/lean-server): set safe value of json-false in lean-server-send-command 2017-01-17 17:10:37 -08:00
Gabriel Ebner
8f9e57231a feat(emacs/lean-server): update messages and tasks immediately when server is finished 2017-01-17 17:10:37 -08:00
Gabriel Ebner
7d9c89b519 feat(emacs/lean-server): show skullbones as soon as server dies 2017-01-17 17:10:37 -08:00
Gabriel Ebner
a230c47178 feat(util/task_queue,emacs,*): highlight running tasks with different background color 2017-01-17 17:10:37 -08:00
Sebastian Ullrich
59055fd5d0 feat(emacs): new and improved goal and next error buffers 2017-01-17 16:38:00 -08:00
Sebastian Ullrich
568862ea91 chore(emacs): remove unimplemented binding C-c C-p 2017-01-17 16:38:00 -08:00
Gabriel Ebner
ab539971a6 fix(emacs/lean-flycheck): only update next-error-mode for current buffer 2017-01-12 13:51:43 -08:00
Sebastian Ullrich
83bddce900 feat(frontends/lean/info_manager,shell/server,emacs/lean-type): info: provide more metadata
* docs: attributes, options, identifiers
* location: attributes, imports
2017-01-11 15:29:14 +01:00
Sebastian Ullrich
3ae4d0fbee feat(shell/completion,emacs/lean-company): provide doc string and location with completion candidate 2017-01-10 16:19:32 +01:00
Sebastian Ullrich
2b374cd517 fix(emacs/lean-company): do not highlight prefix of non-prefix match 2017-01-10 12:25:33 +01:00
Gabriel Ebner
7770e87f69 fix(emacs/lean-server): disable undo and hide process buffers 2017-01-06 14:01:50 -08:00
Leonardo de Moura
27aa8ae4ed chore(emacs/README): remove fill-column-indicator 2017-01-03 11:26:57 -08:00
Scott Morrison
54ee157fa9 fix(emacs): bug in suggested Emacs init
The original code set the variable `lean-required-packages`, but then expected `lean-mode-required-packages`.

I've also added a hint about where to find your emacs init file; this was something I had to learn to follow these instructions.

A question for follow-up: the requirements sections states that `fill-column-indicator` is a dependency, but the suggested init file does not attempt to install this. Should this be fixed?
2017-01-03 11:25:58 -08:00
Sebastian Ullrich
2b0d458094 chore(emacs/lean-util): delete old code 2016-12-27 21:41:02 -08:00
Sebastian Ullrich
3e2d1de21a perf(shell/server,emacs): do not actually compute completions during preliminary 'complete' requests 2016-12-27 21:41:02 -08:00
Sebastian Ullrich
d228c24c81 feat(shell/server,emacs): autocompletion based on server-side parsing 2016-12-27 21:41:02 -08:00