1
1
mirror of https://github.com/tweag/nickel.git synced 2024-10-06 08:07:37 +03:00
Commit Graph

214 Commits

Author SHA1 Message Date
Oghenevwogaga Ebresafe
d7b5741f3f Use regex to get identifier. 2022-10-25 11:42:02 +01:00
Oghenevwogaga Ebresafe
a0139582b6 Use . literal in pattern matching 2022-10-25 10:15:23 +01:00
Oghenevwogaga Ebresafe
c2707ffb31 Remove duplicate CompletionItems. 2022-10-25 10:01:25 +01:00
Oghenevwogaga Ebresafe
fd49e8d2fd Format. 2022-10-24 13:21:48 +01:00
Oghenevwogaga Ebresafe
5fd306206c Use unique IDs instead of string name. 2022-10-24 12:18:34 +01:00
Oghenevwogaga Ebresafe
70888399ec Remove Record Bind. 2022-10-21 12:48:51 +01:00
Oghenevwogaga Ebresafe
d4bdaea44b Refactor. 2022-10-19 15:16:33 +01:00
Oghenevwogaga Ebresafe
7c43b9e523 StaticRecord -> Record 2022-10-18 15:04:36 +01:00
Oghenevwogaga Ebresafe
d45e4d0d38 Get actual type for wildcards 2022-10-18 13:28:12 +01:00
Oghenevwogaga Ebresafe
e9097c9087 Fix wildcard hover 2022-10-17 21:06:52 +01:00
Oghenevwogaga Ebresafe
89161e69b1 Accurate record completion 2022-10-17 15:59:44 +01:00
Oghenevwogaga Ebresafe
6511b779e4 Add dot completion trigger 2022-10-14 08:48:08 +01:00
Oghenevwogaga Ebresafe
0b99e46877 record_bind -> record_ref 2022-10-13 14:02:42 +01:00
Oghenevwogaga Ebresafe
2bd4e21030 Add call to get_record_ref_item at appropriate locations. 2022-10-13 11:49:18 +01:00
Oghenevwogaga Ebresafe
01c7cbb3a9 Use RowIterator to extract Indents. 2022-10-13 01:54:07 +01:00
Oghenevwogaga Ebresafe
eb765389c4 Remove deep cloning of Types. 2022-10-12 13:57:57 +01:00
Oghenevwogaga Ebresafe
737b94564b Remove emacs files 2022-10-12 13:49:52 +01:00
Oghenevwogaga Ebresafe
7923568740 Add more data collection methods for completion. 2022-10-12 13:48:58 +01:00
Oghenevwogaga Ebresafe
37eba61e4b RecordBind -> RecordRef 2022-10-12 11:03:18 +01:00
Oghenevwogaga Ebresafe
0430d4ab5a Add function to register record completion. 2022-10-11 21:05:32 +01:00
Oghenevwogaga Ebresafe
6be907f1dc Move CompletionExtra to a struct. 2022-10-10 16:35:27 +01:00
Oghenevwogaga Ebresafe
56a4577f6c Make transform_wildcard take a shared reference. 2022-10-10 15:57:29 +01:00
Oghenevwogaga Ebresafe
5a882ab481 Replace Wildcards with concrete Types instead of unification variables. 2022-10-07 15:39:14 +01:00
Oghenevwogaga Ebresafe
0aa553d85f First attempt 2022-10-05 10:36:27 +01:00
Acaccia
5fdb8155eb
Merge pull request #835 from tweag/feat/string-interner 2022-10-04 10:39:53 +02:00
Anthony Caccia
36628678d9 Create a method "into_label" in Ident to make conversion more explicit than using "into" 2022-10-03 13:59:19 +02:00
Anthony Caccia
fcd72cba0b fix lsp errors due to new Ident representation 2022-10-03 13:31:05 +02:00
Anthony Caccia
7222983087 Revert "fix lsp/nls errors due to new Ident representation"
This reverts commit 7d92d8c532.
2022-10-03 13:29:16 +02:00
Anthony Caccia
7d92d8c532 fix lsp/nls errors due to new Ident representation 2022-09-29 20:39:46 +02:00
Yann Hamdaoui
4d7d0620fb
Initial context for typechecking
Typechecking is fed an initial typing environment containing the symbols
defined by the stdlib. On the other hand, the term environment, used to
check for contract equality, was initialized empty, as a simplification
for this recent addition. This commit applies the same treatment for
both environment, and provides typechecking with an initial context
(typing env + term env). As a consequence, a few lines added in the REPL
also fix an earlier shortcoming of contract equality checking, which
wasn't effective in the REPL for symbols defined using top-level let.
2022-09-22 10:40:50 +02:00
Yann Hamdaoui
7bbdbdcb72
Return environment items by reference
The previous API of `Environment::get` was returning an owned value.
This doesn't correspond to the usual API for Rust containers. This
commit changes the API to return a reference instead, and let the caller
decide to clone the value or not.
2022-09-15 16:52:25 +02:00
Tor Hovland
748a244ded ErrorTolerance enum. 2022-09-06 08:13:44 +02:00
Tor Hovland
1f2135942a Remove the lax methods from Cache. Lax is now controlled by Cache::error_tolerant. 2022-09-02 12:47:06 +02:00
Tor Hovland
f0da63ecf2 Toggle error tolerance on/off in Cache. 2022-08-31 12:50:31 +02:00
Yann Hamdaoui
ce0f8e71cf Refactoring of global typing environment
Get rid of the useless separation between the global typing environment
and the current typing environment. It was done for performance reasons,
when cloning environments was expensive: but now, environments support
sharing, instead of having two separate environments, we can just start
for the initial (previously "global") and insert directly into it.

Doing so, rename "global" to "initial", which is now more faithful.
2022-08-09 22:39:11 +02:00
Yann Hamdaoui
50e373f181 Bump version to 0.2.1 2022-08-08 15:31:44 +02:00
Yann Hamdaoui
09e3eb85b7 Fix LSP assigning the Dyn type to untyped values 2022-08-08 15:31:44 +02:00
Yann Hamdaoui
2a2f486087 Nickel version: 0.1.0 -> 0.2.0 2022-08-08 15:31:44 +02:00
Yann Hamdaoui
df67a72a18
Merge pull request #792 from tweag/doc/markdown-linting-2
Enable markdown linting for doc
2022-08-05 13:28:21 +02:00
Yann Hamdaoui
1622fe64b7 Markdown linting of LSP and benches READMEs 2022-08-05 11:55:21 +02:00
Yann Hamdaoui
a9e5ee253b Remove debug eprint statements 2022-08-04 11:49:53 +02:00
Yann Hamdaoui
29d727f91d Fix LSP panicking on fields with contracts
Since the refactoring of the typechecker with a distinct walk phase, the
typechecker now also walk contracts and type annotations. This caused
the LSP to panic in a lot of cases (basically, as soon as a contract is
attached to a field), due to scoping issues and breaking some invariants
of the LSP's linearizer.

This commit fixes that by creating a new proper scope() function for
walking contracts (scope_meta). It also removes the old code that used
to (imperfectly) handle contracts directly in the linearizer, dating
back to when the typechecker didn't process annotations.
2022-07-28 17:57:28 +02:00
francois-caddet
ce1afa2c10
quick and dirty fix of lsp error when position is None (#773)
* try to manage items without position in the lsp

* fix `linearisation::Completed::elem_at` and some code cleaning

Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
2022-07-28 16:47:11 +02:00
Yann Hamdaoui
d453b6c414
Merge pull request #721 from tweag/update-deps
Update dependencies
2022-06-09 13:18:31 +02:00
Yann Hamdaoui
da0f5f3948
Make cache::parse not error tolerant by default 2022-06-03 14:38:27 +02:00
Yann Hamdaoui
74f05ba29b
Update all dependencies + corresponding fixes 2022-06-02 17:19:46 +02:00
Ryota
1a5e1f2411 Fix typo 2022-05-20 23:45:10 +01:00
Erin van der Veen
686d87643f Implement let rec 2022-04-21 15:22:44 +02:00
dependabot[bot]
cc64376f8c
chore(deps): bump ansi-regex in /lsp/client-extension
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 11:52:09 +00:00
dependabot[bot]
3ede618f8e
chore(deps): bump minimist from 1.2.5 to 1.2.6 in /lsp/client-extension
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 21:54:12 +00:00