566bc497f3
Fix issue with swapping in Unifier::unifyField()
2023-06-02 21:45:47 +02:00
3a93952b36
Fix error while printing record types
2023-06-02 21:38:06 +02:00
af7fcb52b4
Fix some logic not making use of Checker::makeEqual
2023-06-02 21:18:35 +02:00
6234a49feb
Rename Value to LiteralValue in CST.hpp
2023-06-02 20:58:03 +02:00
bf77031dd5
Add Checker::makeEqual between CEqual and Checker::addConstraint
2023-06-02 20:56:12 +02:00
ca2eb24da2
Remove unused CClass constraint
2023-06-02 20:55:27 +02:00
aede794e43
Keep track of errors in DiagnosticEngine
2023-06-02 16:28:05 +02:00
693301bac6
Improve support for type classes and simplify algorithm
2023-06-01 16:22:37 +02:00
b467f9e644
Attempt to fix the eager solver in Checker.cc
2023-06-01 15:15:53 +02:00
a460b3b28a
Fix some bugs in print logic of CST nodes
2023-05-31 15:05:47 +02:00
25928c288b
Allow { and } on mupltiple lines with any indentation
2023-05-31 14:22:35 +02:00
b64b18216a
Second attemmpt at fixing critical bug in Node::unref()
2023-05-31 13:14:46 +02:00
717a2a663a
Some fixes and new pattern syntax
...
- Fix critical bug in deallocator
- Add TuplePattern
- Add ListPattern
- Make Checker hold a ListType
2023-05-31 12:39:19 +02:00
fa294b826e
Fix diagnostic message for Parser::parsePattern()
2023-05-31 11:16:28 +02:00
eaead44b18
Fix some parsing issues in MatchExpression
2023-05-31 11:15:31 +02:00
fd462f6d05
Tidy up Checker.cc/Checker.hpp a bit
2023-05-30 23:11:41 +02:00
75e0ebc14b
Disable printing the full type(s) on error for now
2023-05-30 21:36:46 +02:00
87af4686b7
Split let-declaration up into function/variable declarations
2023-05-30 21:34:40 +02:00
053d45868e
Rename Checker::pushContext() to Checker::setContext()
2023-05-30 17:00:15 +02:00
63547ee0a5
Fix some regressions due to previous commits
2023-05-30 15:27:21 +02:00
a8f8658f27
Make InferContext have a parent context
2023-05-30 13:37:47 +02:00
83e89f4e8c
Let VSCode update settings.json
2023-05-30 13:36:13 +02:00
41aa820bca
Fix scope resolution
2023-05-30 13:35:26 +02:00
6bd8ecff39
Major update to code base
...
- Add partial support for extensible records
- Rewrite unifier in Checker.cc
- Make use of union/find instead of a HashMap for type variables
- Enhance diagnostic messages
- Add a variant type
- Add application types (TApp)
- Some smaller bugfixes
2023-05-29 20:37:23 +02:00
dfaa91c9b6
Add support for parsing more nodes and small fixes
...
- AppTypeExpression, NestedPattern, NamedPattern and VariantDeclaration
can now be parsed.
- Fixed some memory leaks when a parse error is encountered
2023-05-28 21:49:32 +02:00
ad460bc4a2
Fix references to unbound types not being reported
2023-05-27 23:15:45 +02:00
3efd2a6d6a
Fix some memory leaks and add comment in Parser.cc
2023-05-27 20:57:43 +02:00
8e4fae2228
Improve behavior of parser when failing on a BlockStart
2023-05-27 18:53:38 +02:00
39d576c799
Print a Unicode arrow when TextRange is empty in diagnostics
2023-05-27 18:48:44 +02:00
cc24825ef1
Remove now unused macro BOLT_EXPECT_TOKEN
2023-05-27 15:25:52 +02:00
16e85f26bd
Add support for parsing record declarations
2023-05-27 15:25:17 +02:00
bed5d3cbc4
Enhance 'but got x' output on parse error
2023-05-26 23:48:58 +02:00
91c4b75bc1
Fix crash when parsing invalid class declaration element
2023-05-26 23:46:47 +02:00
9afdd1e607
Make parser more forgiving
2023-05-26 19:51:12 +02:00
4acb76159f
Add CST definitions for record expressions and rename StructDeclaration
2023-05-26 15:36:14 +02:00
4a501c1f77
Remove unused comment in CST.cc
2023-05-26 15:19:40 +02:00
06127ff624
Improve checking recursive functions and some minor fixes
2023-05-26 14:30:50 +02:00
2448a70c76
Fix panic when trying to print tokens
2023-05-24 20:33:32 +02:00
04fffbe9aa
Refactor a bit and split header Diagnostics.hpp
2023-05-24 19:38:04 +02:00
31d813e94b
Fix spacing in InstanceNotFoundDiagnostic
2023-05-24 19:00:02 +02:00
59b553410b
Treat all warnings as errors in C++ sources
2023-05-24 14:13:08 +02:00
6967f9a060
Sort diangostics by node and refactor ConsoleDiagnostics
2023-05-24 14:11:59 +02:00
5ac162cd72
Add support for nested/tuple type expressions
2023-05-23 22:36:01 +02:00
1bba5facc7
Fix infix expressions returning invalid types
2023-05-23 22:34:21 +02:00
7024b8790d
Fix return-statements not being type-checked
2023-05-23 21:51:44 +02:00
1d314808a9
Fix match-expressions not being properly type-checked
2023-05-23 21:51:14 +02:00
3bc77b1bb6
Allow more constraints to be eagerly solved
2023-05-23 21:50:00 +02:00
ebc51539ad
Remove support for 'pervious' environments
2023-05-23 21:32:23 +02:00
be6537f9b9
Fix eager instantiation for deeply structured types
2023-05-23 21:29:27 +02:00
7d694d9a31
Fix panic on encountering a member-expression
2023-05-23 20:56:11 +02:00