Commit Graph

61 Commits

Author SHA1 Message Date
G. Allais
b185f1ff85
[ new ] %unsafe pragma for escape hatches (#2937) 2023-04-03 21:42:47 +01:00
Guillaume Allais
3bccf8e212 [ fix ] highlight record constructor 2023-02-13 15:41:56 +00:00
Stefan Höck
57c589ca80
[ performance ] More stack safety in the Prelude (#2704) 2022-10-26 09:54:53 +01:00
Guillaume Allais
a4b99bd81c [ refactor ] introduce allSemanticHighlighting
Side effect: all the aspects are now sorted by ranges as we are
merging the PosMaps instead of appending the lists.
2022-07-19 15:01:20 +01:00
G. Allais
5e9a90bd97
[ fix ] semantic highlighting in IDE mode (#2509)
* [ fix ] semantic highlighting in IDE mode

Bring back (?) highlighting of goals

* [ debug ] better logging: add length

* [ test ] turns out lengths are not needed!
2022-05-28 11:23:07 +01:00
G. Allais
fdbd858d97
[ refactoring ] expose some internals needed by Katla (#2480) 2022-05-16 20:37:08 +01:00
G. Allais
05baf44b5b
[ refactor ] Index Pretty over the type of annotations (#2371) 2022-04-27 12:26:59 +01:00
G. Allais
22b98f231e
[ fix ] highlight unambiguous names in `with' (#2423) 2022-04-22 13:34:05 +01:00
Guillaume Allais
b4662a8537 [ fix ] show keywords & bound variables 2022-04-14 12:17:11 +01:00
G. Allais
4b6936d615
[ fix ] allow refined implicit patterns in with clauses (#2393) 2022-04-03 10:45:29 +01:00
G. Allais
35b2362487
[ new ] failing blocks (#2360) 2022-03-23 12:01:13 +00:00
G. Allais
1c396744d9
[ doc ] :printdef for interface implementations (#2340) 2022-03-07 11:47:20 +00:00
Guillaume Allais
877025d524 [ fix ] properly decorating pragmas / keywords 2022-01-20 17:55:09 +00:00
Ohad Kammar
3c532ea35d
[ refactor ] IDE protocol as a separate module hierarchy (#2171) 2021-12-16 22:09:00 +00:00
teggot
d3aed0404c
[ fix #1959 ] use modern record update syntax (#2196) 2021-12-16 18:23:18 +00:00
Guillaume ALLAIS
a0846af5fa [ decor ] highlighting comments too
Even though the `Comment` aspect is not (currently) supported
in the IDEMode, this is crucial to get proper highlighting in
Katla's LaTeX & HTML backends.
2021-09-20 17:00:25 +01:00
G. Allais
911a907e74
[ highlighting ] Builtin.assert_ functions using postulate face (#1914) 2021-09-09 18:37:37 +01:00
G. Allais
e2addcf27d
[ new ] semantic highlighting via the IDE mode (#1868) 2021-08-27 14:47:35 +01:00
Stiopa Koltsov
9f61e542b4 Move rm -rf to the beginning of the test
While the discussion about how to refactor test framework is not
finished (#1654), make this change: move `rm -rf build` in the
beginning of the test. For these reasons:

* it is useful to inspect the contents of the `build` directory
  especially after the test failure
* if build crashes mid-test (e.g. process killed), next run should
  not be affected by the `build` directory from the previous run
2021-07-13 22:54:53 +01:00
Ohad Kammar
618c71477e
[ close #1384 ] built-in Snoc-lists [< 1, 2, 3 ] (#1383) 2021-05-20 12:56:25 +01:00
Guillaume ALLAIS
2f66f3e006 [ test ] case for the fix 2021-05-17 22:27:28 +01:00
Guillaume ALLAIS
4917d124aa [ fix ] highlighting of tuples 2021-05-14 13:47:35 +01:00
Guillaume ALLAIS
3610464a10 [ fix ] record projections 2021-05-14 13:47:35 +01:00
Guillaume ALLAIS
210026061d [ fix ] Handle ambiguous DPair/MkDPair 2021-05-13 18:26:06 +01:00
G. Allais
ab241213f3
[ breaking ] making toList part of Foldable (#1395) 2021-05-11 08:26:00 +01:00
Ohad Kammar
e58bcfc7ef
Semantic highlighting (#1335)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-05-10 09:05:43 +01:00
Matúš Tejiščák
f4a790ded4
Identify prefix and postfix record projections (#1183)
`.proj` and `proj` are identically defined but separate functions.
This patch fixes it by defining `.proj` only once, and adding `proj = (.proj)`
for every projection.
2021-03-15 13:40:13 +00:00
GustavoMF31
7f495999bd
Make :typeat a useful command (#998)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-02-05 16:15:40 +00:00
Edwin Brady
3621c5d1bd
Merge pull request #879 from edwinb/no-linearity-subtyping
Remove linearity subtyping
2021-01-12 12:33:26 +00:00
Edwin Brady
fe602caa2c
Merge pull request #765 from ShinKage/ide-mode
IDEMode syntax option and fixed output
2021-01-12 10:39:44 +00:00
Edwin Brady
ad632d825d Remove linearity subtyping
It's disappointing to have to do this, but I think necessary because
various issue reports have shown it to be unsound (at least as far as
inference goes) and, at the very least, confusing. This patch brings us
back to the basic rules of QTT.

On the one hand, this makes the 1 multiplicity less useful, because it
means we can't flag arguments as being used exactly once which would be
useful for optimisation purposes as well as precision in the type. On
the other hand, it removes some complexity (and a hack) from
unification, and has the advantage of being correct! Also, I still
consider the 1 multiplicity an experiment.

We can still do interesting things like protocol state tracking, which
is my primary motivation at least.

Ideally, if the 1 multiplicity is going to be more generall useful,
we'll need some kind of way of doing multiplicity polymorphism in the
future. I don't think subtyping is the way (I've pretty much always come
to regret adding some form of subtyping).

Fixes #73 (and maybe some others).
2020-12-27 19:58:35 +00:00
Wen Kokke
daff1f2fb8
Added assert_linear. (#844)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2020-12-13 16:06:18 +00:00
G. Allais
502f544d73
[ fix #775 ] integerToNat is not, in fact, id (#799) 2020-11-27 18:48:19 +00:00
G. Allais
5e799563fa
[ contrib ] adding Data.Container (#781) 2020-11-27 15:29:19 +00:00
Yu Zhang
08a35d694c
Improving error messages (#786)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2020-11-26 11:35:55 +00:00
Giuseppe Lomurno
b0b8330cd9 New IDEMode syntax option and fixed output 2020-10-31 03:51:19 +01:00
Matus Tejiscak
668762e693 Merge branch 'revert-projections' into master 2020-10-11 08:12:00 +02:00
Chetan Taralekar
3c24bc5ed5
Fix ide mode repl not converting escaped characters (#665) 2020-09-16 10:55:44 +01:00
Matus Tejiscak
ba89bbcc0d Fix tests some more. 2020-09-10 20:41:58 +02:00
G. Allais
a0c0974676
[ debug ] pretty printer for case trees (#652) 2020-09-09 16:22:22 +01:00
Kamil Shakirov
1d601384ce Rename --consolewidth option to --console-width for consistency 2020-08-19 11:59:31 +01:00
Giuseppe Lomurno
42404c2d9d Automatic console width detection 2020-08-18 19:25:36 +01:00
Giuseppe Lomurno
6298a6741d Adds bounds to compiler parser
- Added primitive to compiler parser for precise text boundaries
- Reworked parser with the new primitive
2020-08-18 19:25:36 +01:00
Giuseppe Lomurno
5e9837828a Implementations and errors
- Added initial implementations for terms and values
- Error messages converted to pretty printer
- Colorization for error messages
- Color and console width option both as command line and repl command
2020-08-18 19:25:36 +01:00
Giuseppe Lomurno
b7ba5e88eb Overloaded strings interface
As for integer literals, adds an interface for overloaded string
literals, and the implementation for the prettyprinter library in
contrib.
2020-08-05 02:00:05 +02:00
Edwin Brady
6a53e0177c Reorganise prelude into multiple files
This is partly to tidy things up, but also a good test for 'import as'.
Requires some internal changes since there are parts of reflection,
unelaboration and a compiler hack that rely on where things are in the
Prelude.
2020-07-12 16:55:48 +01:00
Matus Tejiscak
634fe4d171 Fix tests. 2020-07-07 21:06:35 +01:00
Nick Drozd
7d5788471d Update tests 2020-07-07 10:48:23 +01:00
Edwin Brady
c216e1c560 Update test output 2020-07-01 11:53:06 +01:00
Stiopa Koltsov
c140605a0f Extract Prelude.Basics, Prelude.Uninhabited from Prelude 2020-06-22 18:10:06 +01:00