Leonardo de Moura
b53b1825ae
fix(frontends/lean/info_manager): get_closest_env_opts
2014-09-18 17:03:59 -07:00
Leonardo de Moura
9e29602934
fix(frontends/lean/info_manager): make sure env_info is not lost when
...
starting parser in the middle of the 'file'
2014-09-18 16:51:59 -07:00
Leonardo de Moura
970ad72bc3
fix(frontends/lean/pp): protect pretty printer from exceptions
2014-09-18 16:21:20 -07:00
Leonardo de Moura
b3e05a2fe9
refactor(frontends/lean/scanner): remove dependency to seekg and unget
...
methods
It is not safe to use seekg for textual files. Here is a fragment from a
C++ manual:
seekg() and seekp()
This pair of functions serve respectively to change the position of stream pointers get and put. Both functions are overloaded with two different prototypes:
seekg ( pos_type position );
seekp ( pos_type position );
Using this prototype the stream pointer is changed to an absolute position from the beginning of the file. The type required is the same as that returned by functions tellg and tellp.
seekg ( off_type offset, seekdir direction );
seekp ( off_type offset, seekdir direction );
Using this prototype, an offset from a concrete point determined by
parameter direction can be specified. It can be:
ios::beg offset specified from the beginning of the stream
ios::cur offset specified from the current position of the stream pointer
ios::end offset specified from the end of the stream
The values of both stream pointers get and put are counted in different
ways for text files than for binary files, since in text mode files some
modifications to the appearance of some special characters can
occur. For that reason it is advisable to use only the first prototype
of seekg and seekp with files opened in text mode and always use
non-modified values returned by tellg or tellp. With binary files, you
can freely use all the implementations for these functions. They should
not have any unexpected behavior.
2014-09-18 15:24:48 -07:00
Leonardo de Moura
243f80231a
chore(kernel): fix style and lua bindings
2014-09-17 18:30:28 -07:00
Leonardo de Moura
ea1bae0143
refactor(kernel/converter): replace extra_opaque_set with predicate
...
It gives us more flexibility.
2014-09-17 17:05:13 -07:00
Leonardo de Moura
1fbb554a16
feat(library/module): provide predicate module::is_definition
2014-09-17 16:32:00 -07:00
Leonardo de Moura
9733401c20
fix(frontends/lean/tactic_hint): failure when compiling lean terms into
...
tactics: mismatch on the number of universe parameters
2014-09-17 15:23:10 -07:00
Leonardo de Moura
8b76deb971
fix(util/thread_script_state): style
2014-09-17 15:23:10 -07:00
Leonardo de Moura
19148af7ae
feat(build): do not display WARNING message when tcmalloc is not found
2014-09-17 15:23:10 -07:00
Leonardo de Moura
26918022d8
feat(build): use Release when compilation mode is not specified
2014-09-17 15:23:10 -07:00
Leonardo de Moura
e3e1668f27
fix(util/thread_script_state): disable script_state recycling at finalization time
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-17 09:57:17 -07:00
Leonardo de Moura
a72a11db8e
fix(util/script_state_manager): crash when compiling with msys2 stack
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-17 08:39:06 -07:00
Leonardo de Moura
aa5abefaff
fix(util/thread_script_state): make sure system does not crash during
...
finalization
2014-09-17 08:25:21 -07:00
Soonho Kong
9161a6a210
fix(emacs/lean-type): change where to trigger eldoc
...
Previously, eldoc is triggered regardless of current position.
Now, it is triggered:
- *NOT* looking-at whitespace or
- looking-back end-parens such as ')', '}', ']', etc
2014-09-17 00:24:30 -07:00
Leonardo de Moura
9a2f1ba423
fix(util): compilation problems when using msys2
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-16 21:29:51 -07:00
Leonardo de Moura
f03f0aa8b9
fix(util/thread): MULTI_THREAD=OFF mode
2014-09-16 20:44:43 -07:00
Leonardo de Moura
2b0623c0a1
fix(frontends/lean): assertion violations
2014-09-16 18:59:51 -07:00
Leonardo de Moura
78ad24a697
feat(frontends/lean/server): add SYNC command, closes #199
2014-09-16 18:42:34 -07:00
Leonardo de Moura
e3e2370a38
feat(frontends/lean): split 'opaque_hint' command into 'opaque' and 'transparent'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-16 18:03:40 -07:00
Leonardo de Moura
4b51d50ad4
fix(frontends/lean/elaborator): coercion overloading
2014-09-16 15:12:20 -07:00
Leonardo de Moura
dffe9a6f17
fix(frontends/lean/elaborator): more robust support for coercions to
...
function-class that contains implicit arguments
2014-09-16 13:08:34 -07:00
Leonardo de Moura
d0d23eb525
fix(frontends/lean/inductive_cmd): improve name resolution in inductive
...
command
The new test demonstrates the problem being fixed by this commit
2014-09-16 09:48:51 -07:00
Soonho Kong
2a8ddf055b
fix(emacs/lean-option): fix lean-get-options
2014-09-15 17:44:24 -07:00
Soonho Kong
aa9fe958a9
feat(emacs/lean-debug): add lean-debug minor-mode
...
close #177
2014-09-15 16:50:35 -07:00
Leonardo de Moura
af2c3b1815
fix(frontends/lean/info_manager): bug in save_environment_options,
...
server was displaying old results
2014-09-15 16:05:17 -07:00
Leonardo de Moura
93e83baa1b
fix(frontends/lean/parser): commit_upto invocation after 'import'
2014-09-15 16:05:17 -07:00
Leonardo de Moura
feb4993f9c
fix(frontends/lean/server): '[anonymous]' entry being displayed by FINDP
...
This could happen when there is a declaration (e.g., nat) whose type is
equal to an active namespace.
2014-09-15 16:05:17 -07:00
Soonho Kong
18e6481ce3
test(emacs/lean-option-test): add lean-test-update-string-alist-default
2014-09-15 13:04:53 -07:00
Soonho Kong
b650793b33
feat(lean-option): handle default pp.width option value
2014-09-15 13:04:53 -07:00
Soonho Kong
254d861970
feat(bin/linja): pass -D config option to lean
...
Close #196
2014-09-15 13:04:13 -07:00
Soonho Kong
2bdc415a34
fix(emacs/lean-option): handle lean-option-string when it's nil
2014-09-15 11:26:53 -07:00
Soonho Kong
11ff7b5d33
feat(lean-mode): enable mmm-parse-when-idle
...
Related issue: #74
2014-09-15 10:23:38 -07:00
Soonho Kong
f94e28ce39
fix(emacs/lean-mode): disable flycheck-lua inside of lean-mode
...
Related issue: #74
2014-09-15 10:23:31 -07:00
Soonho Kong
c3d39938ac
test(emacs): add lean-option-test
2014-09-15 09:48:33 -07:00
Soonho Kong
4bbfe4ec79
feat(emacs/lean-tags): add lean-global-search
...
close #170
2014-09-15 09:48:33 -07:00
Soonho Kong
ff6862f587
fix(emacs/lean-mode): pass lean-options to lean-execute
...
Related issue: #196
2014-09-15 09:48:26 -07:00
Soonho Kong
75ab5e07d6
feat(emacs/lean-option): save lean-options to lean-global-option-alist
2014-09-15 09:46:06 -07:00
Soonho Kong
f25f9a8fab
fix(emacs/lean-mmm-lua): add 'insert' for mmm-insert-region (C-c % l)
...
Related issue: #74 , https://github.com/flycheck/flycheck/issues/349 , https://github.com/purcell/mmm-mode/issues/32
2014-09-15 00:03:21 -07:00
Soonho Kong
1527efb108
fix(emacs/lean-mode): run company-lean--check-prefix before auto-complete
...
fix #191
2014-09-14 23:15:24 -07:00
Soonho Kong
27b20c5585
fix(emacs/lean-company): fix auto-complete behavior after tab
...
fix #192
2014-09-14 23:15:24 -07:00
Soonho Kong
81ecbb4c94
fix(emacs/lean-company): import auto complete bug
...
fix #189
2014-09-14 23:15:24 -07:00
Soonho Kong
d424cdd336
feat(emacs/lean-company): add custom-variable lean-company-type-foreground
...
Close #190
2014-09-14 23:15:24 -07:00
Soonho Kong
87ad568ae6
fix(emacs/CMakeLists.txt): add all *.el files when install
2014-09-14 23:15:24 -07:00
Soonho Kong
50213fc664
fix(emacs/Makefile): add missing Makefile
2014-09-14 23:14:42 -07:00
Soonho Kong
df588d6ba0
fix(lean-flycheck): make column optional when detecting error/messages
...
fix #194
2014-09-14 23:14:42 -07:00
Leonardo de Moura
d47412d201
fix(frontends/lean/parser): error line numbers for lua code, fixes #194
2014-09-14 21:03:09 -07:00
Leonardo de Moura
841658ec37
feat(library/error_handling): generate valid line and column information
...
when in flycheck mode
2014-09-14 20:15:22 -07:00
Leonardo de Moura
edcbe6fe10
feat(frontends/lean): allow multiple coercions from class A to B, closes #187
...
See new tests (for examples)
tests/lean/run/coe10.lean
tests/lean/run/coe11.lean
tests/lean/run/coe9.lean
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-14 12:59:43 -07:00
Leonardo de Moura
1b6d4460e9
chore(library/coercion): cleanup
2014-09-14 12:59:43 -07:00
Soonho Kong
765d9b032f
feat(src/cmake/modules/CleanOlean.cmake): add CleanOlean.cmake
...
Instead of using 'find -delete', use CMAKE's FILE GLOB_RECURSE and FILE
REMOVE to implement clean-olean.
Related issue: #166
2014-09-14 01:40:21 -07:00
Soonho Kong
2d29d6d319
feat(emacs/lean-company): auto-completion for import
...
Close #126
2014-09-14 00:00:25 -07:00
Soonho Kong
bf9ff192ca
chore(emacs/README.md): add 'f' as a required package for lean-mode
2014-09-13 23:35:38 -07:00
Leonardo de Moura
d647954f93
feat(frontends/lean/elaborator): constraints associated with 'proof-qed'
...
blocks are solved independently, closes #82
2014-09-13 10:21:10 -07:00
Leonardo de Moura
8c8c9d1c4a
feat(frontends/lean/elaborator): cleanup and remove unnecessary code
2014-09-12 17:55:27 -07:00
Leonardo de Moura
0c50517058
refactor(frontends/lean/elaborator): do not save/restore cache
2014-09-12 17:39:11 -07:00
Leonardo de Moura
6db46e0505
fix(frontends/lean/server): std::unordered_map::insert does replace
...
existing entry, fixes #188
2014-09-12 16:50:06 -07:00
Leonardo de Moura
b7023ce1d8
fix(frontends/lean/placeholder_elaborator): do not truncate stream of
...
solutions during class-instance resolution, closes #183
For example, in theorem inverse_unique at category.lean, implicit
arguments are synthesized for inverse_compose. The first solution H' is
not good, and produces a type incorrect solution
2014-09-12 16:12:23 -07:00
Leonardo de Moura
b482f27543
fix(util/lazy_list): bug in filter operation
2014-09-12 16:12:23 -07:00
Leonardo de Moura
b7dcb8f833
fix(frontends/lean/elaborator): remove annotation left-over
2014-09-12 16:12:23 -07:00
Soonho Kong
563cfa73ec
feat(emacs/lean-changes): handle before/after-revert
2014-09-12 14:25:08 -07:00
Soonho Kong
27ae03878c
refactor(emacs/lean-server): rename flush-changed-lines to server-flush-changed-lines
2014-09-12 14:25:08 -07:00
Soonho Kong
c034c54f50
refactor(emacs/debug): rename lean-server-debug to lean-debug
2014-09-12 14:25:08 -07:00
Leonardo de Moura
029acbd1df
feat(library/coercion): better support for coercions to function-class. closes #185
2014-09-12 13:17:20 -07:00
Leonardo de Moura
62585f1c56
fix(library/coercion): remove spurious '\n'
2014-09-12 13:08:47 -07:00
Leonardo de Moura
a2e36e97f2
fix(frontends/lean/builtin_cmds): allow coercion command inside section, fixes #186
2014-09-12 12:13:29 -07:00
Leonardo de Moura
010ecebfea
feat(frontends/lean): add proof-qed expression
...
Remark: we still have to add support to it in the elaborator.
Right now, it is just an embellished parenthesis.
2014-09-11 18:14:49 -07:00
Leonardo de Moura
7ffe73b8ca
fix(frontends/lean): name clash inside section, fixes #181
2014-09-11 16:37:23 -07:00
Leonardo de Moura
85f7132efe
feat(frontends/lean/placeholder_elaborator): perform class-instance resolution in a completely independent unifier object, it also triggers the resolution when expected type does not contain metavariables, closes #175 , closes #173 , closes #68
2014-09-11 14:49:35 -07:00
Leonardo de Moura
03902d4b45
refactor(library/unifier): add option m_discard too unifier, if m_discard == false, then unsolved flex-flex constraints are returned, the unifier also does not apply "last resource" techniques that may miss many solutions.
2014-09-11 14:49:35 -07:00
Leonardo de Moura
935ba35292
feat(library/unifier): keep normalization result when processing universe level unification constraints
2014-09-11 14:49:35 -07:00
Leonardo de Moura
c7c35becb2
feat(library/io_state): add default constructor to io_state
2014-09-11 14:49:35 -07:00
Leonardo de Moura
80fd14b39e
refactor(frontends/lean): replace collect_metavars with metavar_closure helper class
2014-09-11 14:49:35 -07:00
Soonho Kong
b31edb2cee
fix(emacs/lean-company): pass dummy continuation for WAIT
2014-09-11 13:46:07 -07:00
Soonho Kong
0b507777f9
fix(emacs/lean-company): repaint background in the candidate only when required
2014-09-11 13:44:54 -07:00
Soonho Kong
389fe02597
fix(emacs/lean-server): handle modified buffer only when process start
2014-09-11 12:40:10 -07:00
Soonho Kong
733c0e4a77
chore(emacs/lean-server): make trace-mode and debug-mode non-local vars
2014-09-11 12:34:23 -07:00
Soonho Kong
89f38b3945
test(emacs/features): add ecukes template
2014-09-11 12:33:49 -07:00
Soonho Kong
2ba43f1432
refactor(emacs): move tests in *.el files to 'test' directory
2014-09-11 12:29:32 -07:00
Soonho Kong
45b7327d63
doc(emacs/README.md): add contribution section
2014-09-11 12:29:00 -07:00
Soonho Kong
c879b2ce6d
chore(emacs/Cask): add ert-runner, ecukes
2014-09-11 11:12:05 -07:00
Soonho Kong
4b556a41ed
feat(emacs/lean-server): async task queue holds type of cmds as well
2014-09-11 04:09:21 -07:00
Soonho Kong
565402f3d6
feat(lean-server): handle signals (error/quit) in continuations
...
Related with #158
2014-09-11 04:07:50 -07:00
Soonho Kong
5b28480809
chore(emacs/lean-server): send signal info to lean-server-trace
2014-09-11 04:04:20 -07:00
Soonho Kong
92f8a22ea1
fix(emacs/lean-company): send dummy continuation when send wait
2014-09-11 04:03:23 -07:00
Leonardo de Moura
1e5ba9bd75
refactor(frontends/lean/elaborator): move coercion_elaborator to its own module
2014-09-10 16:42:49 -07:00
Leonardo de Moura
6bc41f8dde
refactor(frontends/lean/elaborator): move placeholder_elaborator to its own module
2014-09-10 16:42:49 -07:00
Leonardo de Moura
9ce356e515
refactor(frontends/lean/local_context): do not use references in the local context
2014-09-10 16:42:49 -07:00
Soonho Kong
63c0510a05
feat(emacs/lean-tags): detect and support multiple TAGS
...
Close #170
2014-09-10 16:38:36 -07:00
Soonho Kong
1ea8b66a39
fix(emacs/lean-company): enable auto-complete when prefix length >= 1
...
[skip ci]
2014-09-10 16:21:44 -07:00
Soonho Kong
1c5497e632
feat(emacs/lean-project): add lean-project-create to imenu
...
Related with #170
2014-09-10 15:19:11 -07:00
Soonho Kong
b05ca1db0f
fix(emacs/lean-tags): handle exceptions from find-tag
2014-09-10 14:14:42 -07:00
Soonho Kong
b51e8dd1b9
fix(emacs/lean-server): respect order of messages in check-buffer-and-partition
2014-09-10 14:14:42 -07:00
Soonho Kong
7c4debd1d1
feat(emacs/lean-server): handle modified buffer when send VISIT cmd
...
Close #159
2014-09-10 14:14:42 -07:00
Leonardo de Moura
669b1bff45
refactor(frontends/lean/elaborator): rename choice_elaborator to choice_iterator and move to separate module
2014-09-10 11:20:16 -07:00
Leonardo de Moura
e128610711
chore(tests): use option -t 100000 to speedup tests
2014-09-10 11:20:16 -07:00
Leonardo de Moura
4a4de27a6c
refactor(frontends/lean/elaborator): move local_context to separate file
2014-09-10 11:20:16 -07:00
Leonardo de Moura
4ea322febc
chore(frontends/lean/elaborator): minor cleanup
2014-09-10 11:20:16 -07:00
Soonho Kong
cab1811927
feat(emacs/lean-server): print out signal event to debug buffer
2014-09-10 09:07:16 -07:00
Leonardo de Moura
b82092a123
fix(frontends/lean/parser): segmentation fault after REPLACE, fixes #172
2014-09-10 08:39:39 -07:00