Commit graph

90 commits

Author SHA1 Message Date
Rakarake
b35c19572f Newer changes 2023-03-28 15:26:35 +02:00
Rakarake
4a6c72fce0 Removed codegen to compile, type seem to work for newly added example 2023-03-27 20:11:49 +02:00
Rakarake
0d23a59f0c Merged into commit not compiling on codegen 😤 2023-03-27 19:14:35 +02:00
Martin Fredin
ac3f222753 Add bidirectional type checker, lambda lifter. 2023-03-27 16:07:11 +02:00
Samuel Hammersberg
ccfae19541 Added .crf to every sample-program 2023-03-26 18:38:07 +02:00
Samuel Hammersberg
7e246a94e5 Fixed a segfault. 2023-03-24 19:57:49 +01:00
sebastianselander
56ccd793ac more error messages and better unification 2023-03-24 18:21:07 +01:00
sebastianselander
41fc863658 added PEnum 2023-03-24 17:39:34 +01:00
Samuel Hammersberg
d6d0fb7146 Enabled compiling to llvm again. 2023-03-24 17:29:00 +01:00
Samuel Hammersberg
b1209b3353 Updated the monomorphizer to the new tree. 2023-03-24 17:13:56 +01:00
Samuel Hammersberg
d3d173eb59 Merge remote-tracking branch 'origin/typechecking-merge' into pattern-matching-with-typechecking 2023-03-23 16:33:05 +01:00
sebastianselander
8d1330ad42 typechecker is compatible with one extra addition to the spec 2023-03-23 11:13:48 +01:00
sebastianselander
936cb1301f new grammar and adapted renamer 2023-03-22 12:45:51 +01:00
sebastianselander
88a4a934b8 added more manual tests 2023-03-22 10:32:22 +01:00
Samuel Hammersberg
bbf7a47e74 Started updating the Code Generator to the new monomorphizer tree. 2023-03-21 09:39:05 +01:00
Rakarake
d377ded7e1 Deleted bad sample programs, added polymorphic call in polymorphic function test 2023-03-08 17:38:50 +01:00
Samuel Hammersberg
350cd3b0e9 Started importing Sebastian's new typechecker. 2023-03-08 11:01:07 +01:00
sebastianselander
fce54e7899 documented possible bad functions 2023-03-06 16:41:59 +01:00
sebastianselander
eef6fa7668 added new test and found another bug 2023-03-06 16:25:03 +01:00
sebastianselander
6947614fba Updated bug list & started working on more tests 2023-03-06 13:04:07 +01:00
Samuel Hammersberg
5d004f4286 Added calling conventions to functions. 2023-02-24 09:00:29 +01:00
Samuel Hammersberg
4df3f705ed LLVMIr code now has the fastcc flag to enable speeed 😎 2023-02-20 16:44:27 +01:00
Samuel Hammersberg
cd0f9dd456 The output directory is now cleared when the program is ran. 2023-02-20 15:27:13 +01:00
Samuel Hammersberg
a36de2bde1 Added support for the minus operator. 2023-02-20 14:52:11 +01:00
Samuel Hammersberg
6749650223 Added support for pattern matching on ints. Might need a lookover. 2023-02-20 14:39:43 +01:00
Martin Fredin
a3e57dde7b Change grammar: only one bind in let and no EAnn for typed syntax 2023-02-18 13:02:25 +01:00
Samuel Hammersberg
7cedc2e28c Started adding cases to the grammar. 2023-02-17 15:25:06 +01:00
Samuel Hammersberg
ab34666484 Fixed types on functions in the code generator. 2023-02-16 14:16:08 +01:00
Samuel Hammersberg
5680334fde Fixed some small issues. 2023-02-16 10:03:25 +01:00
Martin Fredin
7ef7090aa5 Merge llvm_testing, and use TypeCheckerIr instead of Abs 2023-02-16 02:17:07 +01:00
Samuel Hammersberg
8d698cecf9 Fixed some merge errors that occured when merging with main
Started implementing EApp.

Simple function calls now work.

Removed the LLVM standard library as it was not needed.

Limited functionality.

Got EApp working!!

Fixed arguments being inserted in the wrong order.

Updated the showing of `Call` so that it inserts a space inbetween arguments.

Removed some unused code from the generated main functions.

Force removed language.

Expressions that are simply just calling a constant now work properly.

Fixed constants being called inside nested expressions.

Cleaned up the compiler a bit.

Added a test suite, testing that the output from programs is correct, "evaluating the whole process".

Fixed a typo in basic-4.sf

Fixed basic-8 to work without a renamer.

Fixed some nicer output in the main function.

Made the outputted LLVM Ir somewhat nicer.

Fixed a typo and updated how SetVariable works.

Formatted and added documentation.

Added instructions allowing for branching.
2023-02-16 00:16:44 +01:00
Martin Fredin
210e55bb15 Adjust old type checker to new syntax, and refactor lambda lifter to use typed AST 2023-02-15 23:55:16 +01:00
sebastianselander
6218efac20 Renamer done.
It renames bound variables to numbers, converts let to lambda, and
removes all variables from binds
2023-02-14 16:44:38 +01:00
Martin Fredin
d67eddcf0f Fix interpreter 2023-02-11 11:04:39 +01:00
Martin Fredin
78a3ed56ea Add test 2023-02-10 16:55:56 +01:00
Martin Fredin
8688b303ac Fix unnecessary supercombinator issue 2023-02-10 16:45:33 +01:00
Martin Fredin
3d8bd24c7b Fix basic tests 2023-02-10 16:45:33 +01:00
Martin Fredin
08917be1c6 Fix first unnecessary supercombinator 2023-02-10 16:45:33 +01:00
Martin Fredin
7c313b3faa Fix basic tests 2023-02-09 20:23:49 +01:00
Martin Fredin
ce31e4d490 Fix first unnecessary supercombinator 2023-02-09 17:53:39 +01:00