Leonardo de Moura
3b23bec25b
feat(frontends/lean): variables/parameters and check commands have access to all section variables/parameters, closes #231
2014-10-08 08:40:55 -07:00
Leonardo de Moura
5b9bd279af
chore(frontends/lean/parser): minor cleanup
2014-10-08 08:40:55 -07:00
Leonardo de Moura
744cee8dd8
feat(frontends/lean): force 'classes' to be declared before instances are declared, closes #228
2014-10-07 18:02:15 -07:00
Leonardo de Moura
d8572e249d
feat(frontends/lean/builtin_cmds): add 'print classes' command
2014-10-07 17:30:57 -07:00
Leonardo de Moura
c31c026f46
feat(frontends/lean/class): accept only inductive datatypes (and records) as classes
2014-10-07 17:30:57 -07:00
Leonardo de Moura
8fa171cb92
refactor(library/unifier): allow general 'unify' procedure to take an initial substitution as argument
2014-10-07 17:30:57 -07:00
Soonho Kong
826166c257
feat(CMakeLists.txt): use bin/package_version if needed
...
1) When git sha1 is available:
Lean (version 0.2.0, commit 4a119a0424
, Release)
2) When git sha1 is not available, but there is bin/package_version file
Lean (version 0.2.0, package 0.2.0~ubuntu1~12.04, Release)
3) Git sha1 is not available, bin/package_version does not exist.
Lean (version 0.2.0, Release)
Close #229
2014-10-07 16:58:44 -07:00
Leonardo de Moura
92c424936a
refactor(kernel/macro_definition_cell): improve macro get_type API
2014-10-07 16:38:31 -07:00
Leonardo de Moura
16041e4948
fix(frontends/lean/elaborator): 'as-is' expressions
...
The elaborator should not introduce implicit arguments on terms marked
as 'as-is'.
2014-10-07 16:38:31 -07:00
Soonho Kong
78e9854bae
fix(emacs): support tabs in a file
...
Fix #226
2014-10-07 14:42:35 -07:00
Soonho Kong
e40ef9f6c5
feat(util/lean_path.cpp): add "exe_path/../lib/lean" to LEAN_PATH
...
Related issue: #223
2014-10-07 13:38:23 -07:00
Soonho Kong
d5abaf6446
feat(CMakeLists.txt): install lean library to LIBRARY_DIR (default: lib/lean)
2014-10-07 12:30:39 -07:00
Soonho Kong
013cd5640e
fix(CMakeLists.txt): rename EMACS_LIB to EMACS_LISP_DIR (default: share/eamcs/site-lisp/lean)
2014-10-07 12:30:39 -07:00
Soonho Kong
103cf57a46
chore(CMakeLists.txt): standard_lib target generates TAGS for library
2014-10-07 12:30:39 -07:00
Soonho Kong
2cf6cf19c0
feat(src): add LEAN_VERSION_PATCH
2014-10-07 12:30:38 -07:00
Soonho Kong
900c7c41a1
fix(shell/lean.cpp): print git commit in version string only when it's available
2014-10-07 12:30:38 -07:00
Leonardo de Moura
531de7990d
refactor(frontends/lean/tactic_hint): simplify tactic_hints
2014-10-07 11:34:58 -07:00
Leonardo de Moura
90ece4dd1b
feat(frontends/lean): remove tactic hints for specific classes
...
The idea is to separate class-instance resolution and tactic framework
as two independent engines.
2014-10-07 09:44:01 -07:00
Leonardo de Moura
dc0e6861b7
fix(emacs/lean-mode): wrong pp highlighting, fixes #225
2014-10-07 02:32:59 -07:00
Soonho Kong
39645390ff
chore(util/*): add cstddef header before including gmp.h/mpfr.h
...
Reference: https://gcc.gnu.org/gcc-4.9/porting_to.html
------
Header <cstddef> changes
The <cstddef> header was updated for C++11 support and this breaks some
libraries which misuse macros meant for internal use by GCC only. For
instance with GMP versions up to 5.1.3, you may see:
/usr/include/c++/4.9.0/cstddef:51:11: error: ‘::max_align_t’ has not been declared
using ::max_align_t;
^
Another possible error is:
someheader.h:99:13: error: ‘ptrdiff_t’ does not name a type
A workaround until libraries get updated is to include <cstddef> or
<stddef.h> before any headers from that library.
2014-10-07 02:36:57 -04:00
Soonho Kong
286aae933c
chore(CMakeLists.txt): add EMACS_LIB option to specify installation path for emacs stuff
2014-10-06 11:20:13 -07:00
Leonardo de Moura
dc92f67588
feat(frontends/lean/server): CLEAR_CACHE forces buffer to be reprocessed
2014-10-06 08:42:20 -07:00
Leonardo de Moura
16562adb87
feat(frontends/lean): add 'coercions' and 'instances' to 'print' command, closes #71
2014-10-05 18:50:48 -07:00
Leonardo de Moura
1306d08399
feat(emacs/lean-input): add shortcuts for subscripts
2014-10-05 13:34:05 -07:00
Leonardo de Moura
60d8369688
fix(library/unifier): missing justification when updating choice constraints
...
The bug was not producing incorrect results, but really bad error
messages.
See: empty.lean.expected.out
2014-10-04 10:40:53 -07:00
Leonardo de Moura
a9741c5c30
chore(frontends/lean/placeholder_elaborator): indent code
2014-10-04 10:36:10 -07:00
Leonardo de Moura
0a288aec40
chore(frontends/lean/proof_qed_elaborator): remove obsolete comment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-10-04 09:19:33 -07:00
Leonardo de Moura
64f6601fe3
fix(frontends/lean/proof_qed_elaborator): information about synthesized variables in a proof-qed block was being lost
2014-10-04 09:15:42 -07:00
Leonardo de Moura
bf01cfeec5
fix(frontends/lean): avoid superfluous local references of the form @-1 (@ f)
,
...
This kind of term also confuses the elaborator
2014-10-04 07:55:32 -07:00
Leonardo de Moura
e71d4548de
fix(frontends/lean): universe levels associated with section variables should not be fixed in the section
2014-10-04 07:13:19 -07:00
Leonardo de Moura
b9e7fecb1f
fix(frontends/lean/elaborator): style
2014-10-03 16:26:28 -07:00
Leonardo de Moura
a1bb6d6017
refactor(frontends/lean/elaborator): expose elaborator class
2014-10-03 16:10:36 -07:00
Leonardo de Moura
dccf8a3a75
chore(frontends/lean/elaborator): fix field name
2014-10-03 15:34:23 -07:00
Leonardo de Moura
938e12baa1
feat(frontends/lean/notation_cmd): allow local numeric notation
2014-10-03 13:55:57 -07:00
Leonardo de Moura
dbb7f834af
refactor(frontends/lean/parser_config): merge notation_ext and mpz_notation_ext
2014-10-03 13:55:57 -07:00
Leonardo de Moura
73eca1ef44
feat(frontends/lean/notation_cmd): notation defined in context overrides existing ones
2014-10-03 13:55:57 -07:00
Soonho Kong
7ea9c32ec8
feat(emacs/lean-server): send SYNC command when visiting a modified buffer
...
Close #201
2014-10-03 10:11:21 -07:00
Soonho Kong
b78043ae24
feat(emacs/lean-mode): add 'clean-cache' to the menu
...
Related issue: #75
2014-10-03 10:11:21 -07:00
Soonho Kong
fffb4e6019
feat(emacs/lean-server): delete cache file (.clean) after visit/load
...
fix #75
2014-10-03 10:11:21 -07:00
Soonho Kong
e255b02fca
fix(emacs/lean-changes): visit file before process any changes
...
This solves many instances of the modified buffer problem.
2014-10-03 10:11:21 -07:00
Leonardo de Moura
c0725d1934
refactor(frontends/lean): remove 'including' expressions
2014-10-03 09:09:27 -07:00
Leonardo de Moura
01d4644026
fix(frontends/lean): bug in include/omit commands: in the end of section/context, the configuration must be restored
2014-10-03 08:52:35 -07:00
Leonardo de Moura
284f300440
feat(frontends/lean): add 'include' and 'omit' commands, closes #184
2014-10-03 07:23:24 -07:00
Leonardo de Moura
6950b4aa9b
fix(frontends/lean/decl_cmds): do not allow section parameters/variables to shadow existing parameters/variables
2014-10-02 18:29:41 -07:00
Leonardo de Moura
d5cad765a0
feat(frontends/lean): enforce new semantics for section 'variables'
...
The library file logic/core/connectives uses the new feature.
2014-10-02 17:55:34 -07:00
Leonardo de Moura
f006d93794
feat(frontends/lean): section variables occur after section parameters
2014-10-02 17:55:34 -07:00
Leonardo de Moura
0a13e7863a
feat(frontends/lean): enforce rule section parameters cannot depend on section variables
2014-10-02 17:55:34 -07:00
Leonardo de Moura
bf081ed431
refactor(kernel): rename var_decl to constant_assumption
...
Motivation: it matches the notation used to declare it.
2014-10-02 17:55:34 -07:00
Leonardo de Moura
4946f55290
refactor(frontends/lean): constant/axiom are top-level commands, parameter/variable/hypothesis/conjecture are section/context-level commands
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-10-02 17:55:34 -07:00
Soonho Kong
91f789c3db
feat(emacs/lean-cmd): add SYNC command
2014-10-02 17:30:03 -07:00
Soonho Kong
5e551db9be
chore(CMakeLists.txt): use $PYTHON_EXECUTABLE instead of "python"
2014-10-02 17:25:13 -07:00
Leonardo de Moura
f78d831de3
refactor(frontends/lean): remove hardcoded Type', and define it using notation
2014-10-02 14:29:51 -07:00
Leonardo de Moura
4cb54ac825
feat(frontends/lean/elaborator): more strict test for bad universe solution
2014-10-02 14:29:51 -07:00
Leonardo de Moura
98e66586e9
feat(frontends/lean/elaborator): elaborator rejects 'Type' if the universe is explicit
2014-10-02 14:29:51 -07:00
Leonardo de Moura
db9671d7c3
fix(frontends/lean/decl_cmds): remove assertion that does not hold anymore
2014-10-02 09:19:40 -07:00
Leonardo de Moura
9a75298892
feat(emacs): highlight Type'
2014-10-02 08:04:00 -07:00
Leonardo de Moura
5bd8e9d141
fix(frontends/lean/decl_cmds): allow private transparent definitions
...
Example:
section
universe l
private definition T := Type.{max 1 l}
...
end
2014-10-02 07:56:01 -07:00
Leonardo de Moura
153e3927ac
feat(frontends/lean/elaborator): modify '!' semantics: it stops consuming arguments as soon it finds an argument that does not occur in the rest of the type.
2014-10-01 18:50:17 -07:00
Leonardo de Moura
ead827d6b7
feat(frontends/lean): add !
operator the "dual" of @
, closes #220
2014-10-01 17:13:41 -07:00
Soonho Kong
72beb438e6
fix(emacs/lean-server): merge server-trace-mode to debug-mode
2014-10-01 14:38:23 -07:00
Leonardo de Moura
c46ec6a548
fix(frontends/lean): missing type information for INFO, fixes #218
2014-10-01 14:29:07 -07:00
Leonardo de Moura
f863d82e69
fix(frontends/lean/pp): pp was not taking into account new namespace name resolution rules, fixes #216
2014-10-01 11:24:45 -07:00
Leonardo de Moura
966366e18e
feat(kernel/inductive): relaxed rules for defining datatypes with explicit universes, closes #217
2014-10-01 10:56:05 -07:00
Leonardo de Moura
263b081e69
fix(frontends/lean/inductive_cmd): temporary aliases must take explicit universes into account, fixes #215
2014-10-01 10:24:44 -07:00
Leonardo de Moura
71077f5c89
feat(frontends/lean/parser): allow _
at level expressions
2014-10-01 10:24:44 -07:00
Soonho Kong
3775d07d5f
fix(emacs/lean-company): use lean-grab-hname for findp auto-completion
...
fix #214
2014-10-01 09:53:48 -07:00
Leonardo de Moura
2730e5163e
feat(frontends/lean): allow 'sorry' implicit argument to access the whole context, and avoid cryptic error message
...
See new test for explanation.
2014-09-30 18:04:04 -07:00
Soonho Kong
89a929e9cd
feat(emacs/lean-syntax): add more word constituents to syntax table
2014-09-30 15:41:18 -07:00
Soonho Kong
9024cb23fd
fix(emacs/lean-util): fix lean-grab-id
2014-09-30 15:41:16 -07:00
Soonho Kong
d5e77c05cb
fix(emacs/lean-flycheck): fix error/warning pattern to work on windows
2014-09-30 15:40:57 -07:00
Soonho Kong
41acc10d49
feat(emacs/lean-flycheck): detect and use flycheck error buffer width
...
Detect the width of flycheck error list buffer and set pp.width when
calling flycheck. It uses the same heuristic that `split-window-sensibly`
function is using.
A user can also set `lean-flycheck-msg-width` custom variable to enforce
a certain width.
Close #205 .
2014-09-30 05:54:46 -07:00
Leonardo de Moura
486839881c
feat(*): use environment fingerprint to detect when the cache cannot be used because the configuration changed, closes #75
...
We are not taking into the account the options object yet.
2014-09-29 18:30:00 -07:00
Leonardo de Moura
19dec32844
feat(library): add environment fingerprint
2014-09-29 18:30:00 -07:00
Leonardo de Moura
530997638a
feat(library/definition_cache): store the hashcode of direct dependencies
...
Actually we store the has code of their types.
2014-09-29 18:30:00 -07:00
Soonho Kong
b538b3e0bf
fix(emacs/lean-company): handle singleton candidate case
...
If we have a singleton auto-complete candidate (e.g. proof_irrel) and it
does not matched with input prefix (e.g. foo), we add the input
prefix (foo) as an extra candidate to prevent the
candidate (proof_irrel) from being automatically selected and completed.
2014-09-29 17:06:01 -07:00
Leonardo de Moura
113879a7dd
feat(frontends/lean/server): sort exact matches by size in FINDP
2014-09-29 16:44:55 -07:00
Leonardo de Moura
334977b8bd
fix(frontends/lean/info_manager): crash when accessing INFO in the end of the file
2014-09-29 16:44:55 -07:00
Leonardo de Moura
a0c37b231f
feat(kernel/expr): add hash_bi function that takes binder information into account
2014-09-29 16:44:55 -07:00
Soonho Kong
7ab8b8acb7
fix(emacs/lean-company): respect lean syntax to extract findp prefix
...
close #207
2014-09-29 16:00:00 -07:00
Leonardo de Moura
0d6d746d98
feat(frontends/lean): check modification time of imported files
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-29 15:17:27 -07:00
Soonho Kong
6c2e576dff
fix(emacs/lean-mode): trigger eri-indent only at the beginning of line
2014-09-29 12:53:22 -07:00
Leonardo de Moura
1a1e9a2340
feat(build): add 'CONSERVE_MEMORY' cmake option
...
When CONSERVE_MEMORY=ON and gcc is being used, we provide additional
command line options that will minimize the amount of memory used by gcc
when compiling Lean.
This is an attempt to fix the "out-of-memory" failures when building
Lean at Travis.
2014-09-29 12:44:29 -07:00
Leonardo de Moura
6630ed8165
fix(frontends/lean/decl_cmds): warning message when compiling with clang++
2014-09-29 12:34:00 -07:00
Soonho Kong
f7ab2f7903
feat(emacs/lean-company): add auto-completion for option names
2014-09-29 12:32:46 -07:00
Soonho Kong
51a0d154d1
fix(emacs/lean-company): always allow typing for FIND_P
2014-09-29 12:32:46 -07:00
Soonho Kong
106399179f
fix(emacs/lean-syntax): use word-boundary instead of symbol-boundary
2014-09-29 12:32:46 -07:00
Leonardo de Moura
21be308884
feat(frontends/lean/inductive_cmd): infer implicit argument annotation after elaboration, allow user to disable it by using '()' annotation, closes #210
2014-09-29 11:11:17 -07:00
Leonardo de Moura
9c55bbb871
feat(frontends/lean/elaborator): report an error when Type becomes a Prop after elaboration, closes #208
2014-09-29 08:18:10 -07:00
Leonardo de Moura
fbbd1d25cd
chore(frontends/lean/decl_cmds): disable incorrect warning message produced by gcc
2014-09-28 12:32:47 -07:00
Leonardo de Moura
397395bbc9
feat(frontends/lean): allow user to associate priorities to class-instances, closes #180
2014-09-28 12:20:42 -07:00
Leonardo de Moura
9f6a8827e0
refactor(*): use name_map
2014-09-28 10:23:11 -07:00
Leonardo de Moura
33fe409dc6
chore(frontends/lean/placeholder_elaborator): cleanup
2014-09-27 22:24:36 -07:00
Leonardo de Moura
22e47430b5
feat(library/unifier): add 'on-demand' choice constraints, they are processed as soon as their type does not contain meta-variables anymore
2014-09-27 21:50:39 -07:00
Leonardo de Moura
e40f8ffe57
fix(util/sexpr/option_declarations): default value in help message, fixes #212
2014-09-27 10:12:59 -07:00
Leonardo de Moura
8e7aac1eb4
fix(frontends/lean): add 'eval' command
2014-09-26 20:16:03 -07:00
Leonardo de Moura
23960da532
feat(emacs/lean-input): shortcut for long arrow
2014-09-26 17:50:33 -07:00
Leonardo de Moura
69f50adb2e
fix(frontends/lean/server): must save the starting environment/options when reprocessing file, fixes #209
2014-09-26 15:36:47 -07:00
Leonardo de Moura
a3e38dc8a0
feat(frontends/lean): allow users to define "numeral notation"
2014-09-26 14:55:23 -07:00
Leonardo de Moura
9928390605
fix(library/match): memory leak that only happens with compiling with clang++
2014-09-26 10:24:38 -07:00
Leonardo de Moura
6bf905aea8
fix(frontends/lean/pp): do not invoke type checker on expressions
...
containing free variables.
This could happened when the pretty printer was used from Lua to print
nested subterms
2014-09-26 09:38:36 -07:00