Leonardo de Moura
34024256ab
chore(library/init/lean/expr): simplify Expr.mvar constructor
2019-08-04 13:24:27 -07:00
Leonardo de Moura
142063fee4
feat(library/init/lean/localcontext): add getUnusedName
2019-08-04 13:14:22 -07:00
Leonardo de Moura
2a914d99dd
feat(library/init/lean/localcontext): missing functions
2019-08-04 13:01:01 -07:00
Leonardo de Moura
c1e36fbaec
feat(library/init/lean/localcontext): add erase and pop
2019-08-04 11:58:53 -07:00
Leonardo de Moura
f55a00a022
feat(library/init/lean): add LocalContext
2019-08-04 09:29:05 -07:00
Leonardo de Moura
c5abab8fd2
fix(library/init/lean/path): <dir>/<mod>.lean must have precedence over <dir>/<mod>/default.lean
2019-08-04 08:38:48 -07:00
Leonardo de Moura
1ef23950a4
chore(library/init/lean/expr): expose temporary legacy constructor
2019-08-04 08:03:09 -07:00
Leonardo de Moura
d2f169a211
chore(library/init/lean/parser/parser): remove unnecessary unsafe code
2019-08-02 14:32:47 -07:00
Leonardo de Moura
1016309d1f
feat(library/init/lean/path): always add builtin search path
...
We also add "." (i.e., current directory) if `LEAN_PATH` is not defined.
Users may still override stdlib since we add the builtin search path in the end.
@dselsam You should now be able to compile your project without setting `LEAN_PATH`
cc @kha
2019-07-31 18:13:17 -07:00
Leonardo de Moura
bfb5bd3752
feat(library/init/lean/elaborator): add universe and universes elaborators
2019-07-31 16:46:02 -07:00
Leonardo de Moura
46f361daab
feat(library/init/lean/elaborator): add open command elaborator
2019-07-31 15:58:04 -07:00
Leonardo de Moura
a9ba3773c7
fix(library/init/lean/path): add support for default.lean
2019-07-31 15:58:04 -07:00
Leonardo de Moura
2f5b2b2409
feat(library/init/lean/path): add realPathNormalized
2019-07-28 20:52:41 -07:00
Leonardo de Moura
378d75b3b4
feat(library/init/lean/path): use toLower at normalizePath if file system is case-insensitive
2019-07-28 19:50:01 -07:00
Leonardo de Moura
a48d635004
chore(library/init/lean/path): include search path in error message
...
Trying to understand why the Windows build is failing at Azure.
2019-07-28 19:11:01 -07:00
Leonardo de Moura
1d0d65893b
fix(library/init/lean/path): user normalizePathSeparators at moduleNameOfFileName
2019-07-28 10:09:51 -07:00
Leonardo de Moura
e0d1892d72
fix(library/init): add normalizePathSeparators
...
Trying to fix broken tests on Windows.
2019-07-28 08:21:48 -07:00
Leonardo de Moura
66a93dbb39
feat(library/init/lean/elaborator/basic): absolutizeModuleName
2019-07-27 18:17:21 -07:00
Leonardo de Moura
2c755c60f5
feat(library/init/lean/path): fileNameToModuleName
2019-07-27 09:56:37 -07:00
Leonardo de Moura
bf5afbc289
feat(library/init/lean/environment): use findOLean implemented in Lean
...
TODO: cleanup `path.lean`
2019-07-26 17:57:43 -07:00
Leonardo de Moura
c1e217da2b
feat(library/init/lean/path): absolutizeModuleName
2019-07-26 17:26:44 -07:00
Leonardo de Moura
9bed367cc0
feat(library/init/lean/modulename): add helper functions
2019-07-26 16:46:03 -07:00
Leonardo de Moura
e9fafd3c4b
chore(library/init/lean/path,stage0): export initSearchPath and update
2019-07-26 16:06:19 -07:00
Leonardo de Moura
e722ea9ed9
feat(library/init/lean): implement findOLean and findLean in Lean
2019-07-26 16:04:10 -07:00
Leonardo de Moura
5a1380ec6a
feat(library/init/lean): add lean/path.lean
2019-07-25 19:28:22 -07:00
Leonardo de Moura
ff88c35fc1
refactor(library/init): move io and platform to system subdir
2019-07-25 17:29:33 -07:00
Leonardo de Moura
f6d3fc881d
feat(library/init): add platform.cpp
2019-07-25 17:19:50 -07:00
Leonardo de Moura
72ff4eb8e2
feat(library/init/lean/elaborator/command): implement export command
2019-07-24 14:55:27 -07:00
Leonardo de Moura
e0797bba14
fix(library/init/lean/elaborator/command): bug at addScopes
2019-07-24 14:55:05 -07:00
Leonardo de Moura
3145994e36
feat(library/init/lean/elaborator/basic): register declaration name prefixes as namespaces at Environment.add
2019-07-24 13:24:02 -07:00
Leonardo de Moura
cf8daf4b24
feat(library/init/lean/elaborator): process header
...
TODO:
- improve/fix `setSearchPath`
- add `IO.getEnv`
- add support for relative imports at `absolutizeModuleName`
2019-07-24 07:37:33 -07:00
Leonardo de Moura
b792afb9d5
feat(library/init/lean/elaborator): add root scope and resolveNamespace
2019-07-23 09:14:01 -07:00
Leonardo de Moura
4187a099c2
fix(library/init/lean/elaborator/command): typo
2019-07-22 19:08:16 -07:00
Leonardo de Moura
b5d4e0a2fd
chore(library/init/lean/elaborator/basic): improve cryptic error message
2019-07-22 19:07:43 -07:00
Leonardo de Moura
39b5fbb767
feat(library/init/lean/elaborator): registerNamespace
2019-07-22 18:47:25 -07:00
Leonardo de Moura
825c952f58
chore(library/init/lean/scopes): add TODO
2019-07-22 18:22:56 -07:00
Leonardo de Moura
c40cba66fb
fix(library/init/lean/parser/parser): use eraseDups when registering builting parsers
2019-07-22 18:19:47 -07:00
Leonardo de Moura
3609057848
feat(library/init/lean/elaborator/basic): add OpenDecl
2019-07-22 17:40:37 -07:00
Leonardo de Moura
b098cc69ea
chore(library/init/lean/elaborator/command): ignore Lean3 notation commands
2019-07-22 15:16:17 -07:00
Leonardo de Moura
231c01bf9f
feat(library/init/lean): add alias.lean
2019-07-22 15:06:17 -07:00
Leonardo de Moura
2387f3c2a2
feat(library/init/lean/elaborator): improve namespace, scope, and end commands
2019-07-22 08:14:35 -07:00
Leonardo de Moura
eb47746647
feat(library/init/lean/elaborator): namespace, section and end commands
2019-07-21 16:55:23 -07:00
Leonardo de Moura
fdb2fb3f0d
chore(library/init/lean): add helper function
2019-07-21 08:21:20 -07:00
Leonardo de Moura
a535d348de
feat(library/init/lean/elaborator): use SyntaxNode to define TermElab and CommandElab
2019-07-21 07:29:41 -07:00
Leonardo de Moura
35d841e6ea
chore(library/init/lean/syntax): change default to Empty
2019-07-20 06:57:48 -07:00
Leonardo de Moura
fdbbdf68fc
refactor(library/init/lean/elaborator/basic): make sure ElabState does not depend on parser state
...
cc @kha
2019-07-19 17:07:39 -07:00
Leonardo de Moura
76c27c9aa4
feat(library/init/lean/syntax): update preresolved field
...
The `Nat` is for handling the ambiguous `.` notation in Lean during
preresolution. Recall that `x.y` may represent a hierarchical name or
a "field access".
2019-07-19 11:11:50 -07:00
Leonardo de Moura
2ad33a23db
chore(runtime,library/init/lean): remove evalConst
2019-07-19 11:04:57 -07:00
Leonardo de Moura
b634fc30ee
chore(library/init/lean/elaborator/command): add command.lean
2019-07-19 10:54:39 -07:00
Leonardo de Moura
27e0ad0d9e
chore(library/init/lean/compiler/ir/emitcpp): remove constant registration
2019-07-19 10:52:18 -07:00