Commit graph

45 commits

Author SHA1 Message Date
ca2eb24da2
Remove unused CClass constraint 2023-06-02 20:55:27 +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
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
fd462f6d05
Tidy up Checker.cc/Checker.hpp a bit 2023-05-30 23:11:41 +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
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
ad460bc4a2
Fix references to unbound types not being reported 2023-05-27 23:15:45 +02:00
06127ff624
Improve checking recursive functions and some minor fixes 2023-05-26 14:30:50 +02:00
04fffbe9aa
Refactor a bit and split header Diagnostics.hpp 2023-05-24 19:38:04 +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
4ecc0d9724
Clean up, fix bug and make type classes with var-decls work
Bug to be fixed is a rigid type variable of a type class being added to
the parent context, causing eager solving to fail.
2023-05-23 20:47:41 +02:00
b8e989d03f
Eagerly solve some constraints when certain conditions are met 2023-05-23 20:09:05 +02:00
b23dc84f72
Fix variable declarations, fix regression due to eager solving, fix unification 2023-05-23 16:07:58 +02:00
302823ac9b
Split up Checker.hpp and make room for better type mismatch errors 2023-05-22 22:37:58 +02:00
508ef40bdf
Implement tuples and fix bug with type vars in infer/unify algorithm 2023-05-22 17:06:31 +02:00
bce5bffa85
Add support for parsing member expressions 2023-05-22 11:54:52 +02:00
4e27d778f0
Add some comments and lookup type class let declaration with Scope::lookupDirect() 2023-05-21 20:33:06 +02:00
093f307098
Fix instance declarations not being correctly typechecked 2023-05-21 20:14:41 +02:00
3d19ce988c
Add some comments to checkTypeclassSigs() 2023-05-21 17:53:07 +02:00
56cbfc6fbe
Add support for literal patterns 2023-05-21 17:36:44 +02:00
17d21d234b
Enable type-checking of match expressions 2023-05-21 17:14:11 +02:00
b6706dd801
Fix constructors like True and False not being parsed 2023-05-21 14:50:28 +02:00
66d7b90f82
Clean up some code and introduce IdentifierAlt 2023-05-21 00:25:01 +02:00
db26fd3b18
Add experimental support for type classes and many more enhancements 2023-05-20 23:48:26 +02:00
936afd3be0
Fix bug in inferencer and rename some variables 2023-05-08 19:57:24 +02:00
2f8ea813bc Add deps, update cade a bit and add generators 2023-04-12 11:15:36 +02:00
cfb596f8e1 Add partial support for recursive functions 2022-08-26 22:10:18 +02:00
43301a3a44 Add basic support for if-statements 2022-08-25 23:04:09 +02:00
b4d54f025c Improve type inference and some minor updates 2022-08-25 19:04:25 +02:00
fcea25c9bb Improve diagnostic output 2022-08-24 20:57:26 +02:00
fb69ab745c Add more methods to bolt::Node and improve diagnostics 2022-08-24 12:36:43 +02:00
311f1d228b Improve diagnostics and type checking 2022-08-21 20:56:58 +02:00
Sam Vervaeck
cd1e20d460 Partially implement a type checker 2022-08-21 16:25:52 +02:00