1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 17:32:00 +03:00
Commit Graph

676 Commits

Author SHA1 Message Date
Łukasz Czajka
93d5bdcd25
Improve the test for eta-expansion of constructors and builtins (#1583) 2022-10-14 13:25:49 +02:00
Paul Cadman
be9872ea06
Add builtin if (#1585)
```
builtin boolean-if
if : {A : Type} → Bool → A → A → A;
if true x _ := x;
if false _ x := x;
```

This allows a backend to translate if directly, so that only one branch
is evalutated.

An example compilation of if is given for the legacy backend for testing.
2022-10-14 10:06:05 +01:00
Łukasz Czajka
80783cfa3c
Parse optional type info in JVC files (#1575) 2022-10-13 16:54:51 +02:00
Paul Cadman
be5e2b9f2a
Add builtin boolean (#1582)
builtin boolean
inductive MyBool {
  myTrue : Bool;
  myFalse : Bool;
};

The first constructor is mapped to primitive true and the second
constructor is mapped to primitive false.

This also adds compilation of builtin boolean in the legacy backend as
this was trivial to implement.
2022-10-13 14:03:49 +01:00
janmasrovira
d7e208aac1
1569 rewrite the test for lambda lifting to use evaluation (#1572) 2022-10-12 10:19:02 +02:00
janmasrovira
fc75660774
Add softlines between applications and hang definitions (#1578)
add softlines between applications and hang definitions
2022-10-06 11:56:33 +11:00
Łukasz Czajka
f4ca940c7a
Fix symbol numbering bug (#1574) 2022-10-04 17:06:51 +02:00
janmasrovira
57446c67fe
Keywords refactor (#1566)
* refactor keywords wip

* add backslash to reserved symbols

* remove comment

* remove dead code

* add keywordHasReserved field

* format
2022-10-04 11:06:52 +11:00
Łukasz Czajka
a39ebf92f6
Remove lambda from reservedSymbols (#1568) 2022-09-30 12:32:17 +02:00
janmasrovira
803d2008d9
remove ≔ from the language and replace it by := (#1563)
* remove ≔ from the language and replace it by :=

* revert accidental changes in juvix input mode

* update stdlib submodule

* rename ℕ by Nat in the tests and examples

* fix shell tests
2022-09-30 10:55:32 +10:00
Łukasz Czajka
f0ade4be7c
JuvixAsm (#1432) 2022-09-29 17:44:55 +02:00
janmasrovira
9f80d17fd2
Mutual inference (#1543) 2022-09-26 19:14:17 +02:00
janmasrovira
6a35db7475
Properly handle top lambdas in the termination checker (#1544) 2022-09-26 16:03:36 +02:00
Murray
84aabe81c1
Remove duplicate function in concrete analysis (#1550) 2022-09-26 14:58:22 +02:00
janmasrovira
13b038b5a1
Fix arity checker bug (#1546) 2022-09-26 14:39:37 +02:00
janmasrovira
41ef5f6219
Add lambda expressions to internal and add typechecking support (#1538) 2022-09-23 15:43:18 +02:00
janmasrovira
9aa045f3aa
Evaluator minor style refactor (#1547) 2022-09-23 14:39:21 +02:00
janmasrovira
5797133011
Add some labels to the parser (#1535) 2022-09-16 11:02:33 +02:00
Paul Cadman
a246d57bff
Autocomplete ".jvc" input files for core {eval, read} commands (#1542)
Complete ".jvc" input files for core {eval, read} commands
2022-09-15 16:02:20 +01:00
Paul Cadman
b6f1ecac73
Add --show-de-bruijn to core eval command (#1540)
This option was removed as part of one of the cli refactors
2022-09-15 15:26:02 +01:00
Łukasz Czajka
fc1bf894c0
Inductive types should depend on the types of their constructors (#1537) 2022-09-15 10:33:01 +02:00
janmasrovira
dab4b6fc0f
look in patterns when building the dependency graph (#1536) 2022-09-15 09:45:55 +02:00
Jonathan Cubides
60354be737 Update Changelog v0.2.5 🎉 2022-09-14 18:08:46 +02:00
Jonathan Cubides
9e6b823352 Bump version to 0.2.5 2022-09-14 17:41:02 +02:00
janmasrovira
60d4f0433a
Refactor CLI (#1527) 2022-09-14 16:16:15 +02:00
Łukasz Czajka
4396f34be4
'Match' with complex patterns in Core (#1530) 2022-09-14 15:44:13 +02:00
janmasrovira
9e0bbf7351
Replace -> by := in lambda syntax (#1533) 2022-09-14 14:31:28 +02:00
janmasrovira
3262906772
Implement lambda lifting without letrec (#1494)
Co-authored-by: Paul Cadman <git@paulcadman.dev>
Co-authored-by: Łukasz Czajka <62751+lukaszcz@users.noreply.github.com>
2022-09-12 12:45:40 +02:00
Łukasz Czajka
2eb51ce1c3
Make comma a delimiter (#1525) 2022-09-12 11:39:11 +02:00
janmasrovira
e3dbb308d3
Detect nested patterns as smaller in the termination checker (#1524) 2022-09-12 11:21:39 +02:00
janmasrovira
380ade56dc
Add CanonicalProjection (#1526)
add CanonicalProjection
2022-09-12 09:44:00 +01:00
janmasrovira
ccce5a4a31
Disallow tab characters as spaces (#1523) 2022-09-07 13:59:41 +02:00
Łukasz Czajka
f5402aa4f7
Refactor destruct in Core/Extra/Base (#1522) 2022-09-07 12:25:47 +02:00
Łukasz Czajka
09b818ed9e
JuvixCore primitive types (#1521) 2022-09-07 10:22:11 +02:00
janmasrovira
81a9aea451
Back recursor types with type families (#1514) 2022-09-06 17:16:54 +02:00
Łukasz Czajka
41843b840f
Stripped version of Core Node datatype (#1518) 2022-09-06 16:45:21 +02:00
janmasrovira
42d8c6fcf6
Enable autocompletion for the --theme flag (#1519) 2022-09-06 16:15:57 +02:00
janmasrovira
57ac2acce8
Implement some instances for BinderList (#1515) 2022-09-06 15:42:46 +02:00
janmasrovira
4f05ba2531
Add internal core read command (#1517) 2022-09-06 15:26:48 +02:00
Łukasz Czajka
1fdc3674ba
LetRec in Core (#1507) 2022-09-06 12:28:09 +02:00
Łukasz Czajka
aa6caf2c75
Dynamic type in Core (#1508) 2022-09-06 11:45:20 +02:00
Łukasz Czajka
28ceab6c2c
Core/Extra/Recursors/Collector bugfix (#1510) 2022-09-06 09:47:02 +01:00
janmasrovira
2fba48a4b1
Add Haddock and Agda licenses (#1506) 2022-09-06 09:30:01 +01:00
Łukasz Czajka
d64cf13d30
Eager evaluation of Constr arguments (#1513) 2022-09-05 16:52:41 +02:00
Paul Cadman
24af7702d3
Fix docs webapp examples CI build (#1505)
The default compile target is now native, so we need to pass `-t wasm`
to the webapp examples build.
2022-09-05 13:38:04 +01:00
Łukasz Czajka
be4915ca6c
Refactor Node datatype (#1501) 2022-09-02 10:21:12 +02:00
Łukasz Czajka
708a4032c6
Add an option to show name ids in errors (#1486) 2022-09-01 13:22:32 +02:00
Łukasz Czajka
6559695165
Refactor BinderInfo (#1503) 2022-09-01 12:40:12 +02:00
Paul Cadman
6f944246fb
Add CLI usage examples doc and integrate with README (#1504) 2022-09-01 10:54:38 +01:00
Paul Cadman
105188b53f
Make juvix compile default to native target (#1502) 2022-08-31 19:29:06 +02:00