Commit graph

139 commits

Author SHA1 Message Date
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
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
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
767572b197
Fix long command hooks not being recognised 2023-04-14 20:33:29 +02:00
aefba5a175
Put all additional resources in assets/ 2023-04-14 20:11:41 +02:00
fd466fb4e8
Add missing which npm package to compiler 2023-04-14 20:06:43 +02:00
2f7993ea17
Add missing .gitignore 2023-04-14 20:06:31 +02:00
3fc184a0ce
Move compiler to its own subdirectory 2023-04-14 20:04:14 +02:00
beac8eb0ac
Allow custom commands to be called from the main binary
These commands can be made available in the PATH and will be picked up
when running `bolt`. For instance, an executable `bolt-doc` will be ran
when running `bolt doc`.
2023-04-14 20:01:04 +02:00
e50f45992c
Expose mose of the compiler functions/classes as an API 2023-04-14 19:59:52 +02:00
26f50c5b50
Make most classes serializable and remove bolt-selftest.ts
bin/bolt-selftest.ts will be moved to a separate package
2023-04-14 19:58:23 +02:00
d3b713624d
Fix nodes not being properly assigned to CEqual 2023-04-13 17:22:45 +02:00
e2923f63c0
Fix infinite loop while searching for nodes in type chain 2023-04-13 17:22:15 +02:00
9f6fe70f38 Fix regression in type checking of extensible records 2023-04-13 14:43:47 +02:00
1cbd2e8a23 Merge with local implementation of toStringTag 2023-04-13 14:36:28 +02:00
11bae0fed0
Update dependencies 2023-04-12 22:01:39 +02:00
78ea550afd
Fix broken image link in README.md 2023-04-12 21:59:33 +02:00
d19c64845d
Add test regarding assignment and polymorphism 2023-04-12 21:52:10 +02:00
94c9e83d06
Fix typo in diagnostic messages 2023-04-12 21:39:06 +02:00
e7493d0d49
Multiple updates to code base
- Fix variable polymorphism by addding missing generalization step
 - Add method for `util.inspect` to make pretty-printing easier
 - Remove WrappedOperator and replace it with NamedPattern
2023-04-12 21:16:48 +02:00
17bdb2d7cb
Fix some bugs in textual input/ouput 2023-04-12 19:38:45 +02:00
49a83f9a77
vscode: Add launch.json for running on test file 2023-04-12 14:29:56 +02:00
d684548141
.gitginore: Add some comments and new rules 2023-04-12 14:29:17 +02:00
f2ea45873c
Fix minor indentation issue in checker.ts 2023-04-12 14:27:21 +02:00
9c24ddb07e
Move 'type class exists' check to initialze() 2023-04-12 14:26:39 +02:00
36012be49a Add missing declarations for custom inspect methods 2023-03-19 17:03:54 +01:00
5c8a296cab Add a test for extensible records 2023-03-19 17:03:30 +01:00
1b918dcaf0 Add support for AssignStatement in lexical analysis and CST 2023-03-19 17:02:59 +01:00
af996c13fe Fix wrong refactor of error messages containing 'this' 2023-03-19 16:37:40 +01:00
947b6d8740 Manually filter out type variables in type scheme that do nothing 2023-03-19 15:04:47 +01:00