Commit graph

267 commits

Author SHA1 Message Date
449cda8fc4 Ignore .python-version
It might differ from system to system (e.g. a virtual environment in one
but a version number in another)
2024-02-03 21:05:51 +00:00
de29a77cd3
Add support for record patterns and improve implicit forall 2024-01-22 01:11:59 +01:00
34b7693229
Fix bug where field is missing from record type expression 2024-01-21 09:16:46 +01:00
00dbada7ac
Add support for record type expressions 2024-01-21 08:51:50 +01:00
1b5c32fe29
Add NamedRecordPattern and rename NamedPattern to NamedTuplePattern 2024-01-21 05:40:35 +01:00
7ac3c39164
Make TypeEnv sort variables on whether they are a var or a function
Fixes RecordDeclaration and VariantDeclaration not working correctly
2024-01-21 03:42:25 +01:00
7b58a6c51f
Add more tests for tuple type checking 2024-01-21 03:41:43 +01:00
cb1a1521f5
Small fix to wording in output of 'bolt verify' 2024-01-21 03:40:24 +01:00
7ccda2e69b
Fix segfault when CField has been substituted 2024-01-21 02:01:55 +01:00
a2701257dd
Prevent infinite loops when checking something like "foo".0.1.2 2024-01-21 01:56:01 +01:00
f2550e9430
git: Add compile_command.json to .gitignore and update comment 2024-01-21 01:51:25 +01:00
3979a9010b
Dont let Diagnostic inherit from std::runtime_error
We are not using exceptions
2024-01-21 01:12:02 +01:00
25ccf60e02
Make VSCode launch test sandbox Bolt code by default 2024-01-21 01:11:29 +01:00
3942004f76
Switch to field constraints instead of TTupleIndex 2024-01-21 01:10:59 +01:00
4ab4094acc
Add sample CMake invocation to README.md 2024-01-21 00:20:04 +01:00
4e11af005c
Make Type a union and fix checking of tuple access 2024-01-21 00:18:09 +01:00
75124d097b
Update link to Zen project 2024-01-20 20:09:14 +01:00
135b0cd6e9
Update README for C++ subproject 2024-01-15 14:27:41 +01:00
285f33e93c Add 'bootstrap/cxx/' from commit '7c1a929e9a3d3abb1e2113f531588e059ad5be8c'
git-subtree-dir: bootstrap/cxx
git-subtree-mainline: b732e418cb
git-subtree-split: 7c1a929e9a
2024-01-15 14:04:51 +01:00
b732e418cb
Update examples in README.md 2024-01-15 13:57:38 +01:00
c157a5e6ec
Move JavaScript-based compiler to bootstrap/js 2024-01-15 13:56:07 +01:00
7c1a929e9a
Remove hard dependency on LLVM in code 2024-01-15 11:53:44 +01:00
7eed7998e8
Rename UniVar to RegularVar 2023-08-30 12:07:53 +02:00
0d7b7fec8d
Remove some unused imports 2023-08-13 15:43:10 +02:00
0faea35446
Make let-declarations in type class declarations always functions 2023-08-13 15:42:48 +02:00
e92e346bad
Decouple type checking info from CST and refactor checker.ts a bit 2023-08-12 13:46:19 +02:00
aa386f2e79
Add tests to source control 2023-08-11 12:29:14 +02:00
27d25fb849
Make example in README.md copy-pastable 2023-08-10 15:20:34 +02:00
b08bdbc6f7
Add a test for a large mutual recursion 2023-08-10 13:17:01 +02:00
859b1676fd
Clean up type checking code a bit 2023-08-02 10:37:13 +02:00
89feeaadb6
Remove reference to TNominal in checker.ts 2023-07-28 20:42:24 +02:00
985e2d0652
Improve handing of struct/enum types and declarations
Also removes TNominal from the list of types because it is redundant
w.r.t. TCon.
2023-07-04 20:38:40 +02:00
bd4ed57c46
Add support for verifying diagnostic messages 2023-07-01 01:26:18 +02:00
3cfb816d6a
Remove obsolete console.log-statement in scope.ts 2023-07-01 01:25:55 +02:00
996a2f8928
Disable browser APIs in TypeScript project 2023-07-01 01:25:18 +02:00
eaaa258fbd
Fix type checking bug in 'bolt verify' command 2023-06-30 20:35:48 +02:00
7a0cb6753a
Add a 'verify' command, ...
- Add a command to check the integrity of the compiler
 - Add a diagnostic when a tuple index is out of bounds
 - Make 'build' the default command
 - ...
2023-06-30 19:30:42 +02:00
d194ff9b2e
Fix rigid type vars not instantiating correctly by introducing
union-find
2023-06-28 22:09:17 +02:00
8d2f3c4977
Remove (de)serialization logic 2023-06-26 19:02:23 +02:00
650cecb707
Add rigid type vars and some other enhancements
- Add TRigidVar as a type
 - Make VarTypeExpression generate a TRigidVar
 - Rename `TVar` to `TUniVar`
 - Make kind checker use `kindOfType` instead of `new KType()`.
2023-06-26 18:54:20 +02:00
91a4872c34
Merge solver back with checker and apply algorithm for eager constraint
solving
2023-06-22 16:19:51 +02:00
2f9b6db5af
Adjust the way let-declarations are visited in the type-checker
Let-declarations are now roughly visited in the order they are
referenced, resulting in constraints being propagated in the same way.
2023-06-22 15:30:14 +02:00
6df807440a
Upgrade dependencies and check in package-lock.json 2023-06-21 16:58:02 +02:00
f58011e50e
Refactor by splitting into multiple files 2023-06-21 16:56:04 +02:00
935420d418
Fix bug in lexing a word directly after an empty comment 2023-06-15 16:40:28 +02:00
8b1263c376
Revert "Make it possible to nest match-expressions"
This reverts commit ac7467bccb.

The commit breaks too much syntax.
2023-06-15 16:29:35 +02:00
ac7467bccb
Make it possible to nest match-expressions
Although this fixes #46, this introduces a new bug for expressions that
require punctuation to be turned off. We will adress this in a separate
issue.
2023-06-12 22:00:46 +02:00
8addcb0990
Add some more automated test snippets 2023-06-12 16:54:41 +02:00
a3f40d51ef
Some enhancements in the parser
- Fix MemberExpression and IfStatementPart not receiving annotations
 - Enable parsing of elif-statements
 - Refactor some code
2023-06-12 16:53:26 +02:00
2be3deb5f6
Add missing ConsolePrinter.hpp and ConsolePrinter.cc 2023-06-12 16:52:10 +02:00