Commit graph

120 commits

Author SHA1 Message Date
32f961aad9
Add missing newline terminator in ConsolePrinter.cc 2025-02-28 18:10:34 +01:00
17c967a475
Use embedded LLVM and fix compile errors 2025-02-28 17:31:12 +01:00
76bfa1c0e2
Add OpenFileFailedDiagnostic 2025-02-14 16:13:51 +01:00
4e1771cf2a
Refactor parser to pass around a 'forkable' TokenStream 2024-07-11 21:08:52 +02:00
5cd4cc3e84
Improve support for typechecking mutually recursive functions 2024-07-11 21:05:14 +02:00
1d091c58d0
Prettyfy definitions in Checker::run() 2024-07-11 21:04:43 +02:00
c1e1962cfd
Fix unbound variables not being searched for in the solved type 2024-07-11 21:03:32 +02:00
71912f8c65
Fix incorrect type checking of anonymous match expressions 2024-07-11 21:02:58 +02:00
2b7ae3eba3
Fix some panics when printing certain AST nodes 2024-07-11 20:20:25 +02:00
c8ceff3210
Type check arrow type expressions 2024-07-11 16:39:19 +02:00
9578e5d252
Rename some variables in Checker.cc 2024-07-11 16:38:41 +02:00
4b9fbc1d0c
Type-check match-expressions, nested expressions and literal patterns
Also introduces '$' as a new binding
2024-07-11 10:09:57 +02:00
1d2306513e
Add support for type-checking function expressions 2024-07-11 09:09:27 +02:00
556fc28eb7
Add parsing support for function expressions and format Parser.cc 2024-07-10 23:09:45 +02:00
e386a7095b
Adjust syntax to distinguish between variables and functions 2024-07-10 17:17:09 +02:00
87bb0d0b10
Refactor CST and enable typechecking of do-expressions 2024-07-10 16:02:07 +02:00
449991d0c9
Enable parsing of block expressions
Part of fixes for issue #65
2024-07-10 12:03:24 +02:00
9af655c072
Fix crash when a reference to an unbound var is checked 2024-07-10 09:39:40 +02:00
5ba2aafc68
Switch to bidirectional type-checker and many more improvements 2024-06-21 00:23:27 +02:00
c907885420
Make C++ implementation the main implementation 2024-04-08 20:08:15 +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
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
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
d5e85869fb Add util.inspect methods to types and constraints 2023-03-19 15:02:19 +01:00
c559d13df9 Minor improvements, add some experimental type class logic and refactor diagnostics 2023-03-16 21:50:15 +01:00
df5f857905 Add extensible records and add foundations for typeclasses 2023-03-14 13:15:33 +01:00
f995d887e7 Add Syntax.clone() method and '\\' token 2023-02-06 11:52:20 +01:00
3e14538d15 [WIP] Add support for typeclasses 2023-02-03 17:52:34 +01:00
2c9ab75a94 Switch to commander instead of yargs for argument parsing 2022-09-19 16:17:20 +02:00
4fed500ea3 Fix assignment of type to a type expression in checker.ts 2022-09-19 14:06:12 +02:00
6af1fabb88 Refactor codegen into interchangeable passes 2022-09-18 21:37:24 +02:00
404ac83101 Add a test for module references inside type expressions 2022-09-18 21:36:41 +02:00
0d5c791a70 Refactor and improve module references in kind inference 2022-09-18 19:33:34 +02:00
3e169e9ab9 Add experimental support for referencing module elements 2022-09-18 14:33:49 +02:00