Commit graph

39 commits

Author SHA1 Message Date
Samuel Hammersberg
582747a997 The created binary is now saved in the output folder. 2023-03-27 10:07:04 +02:00
Samuel Hammersberg
91cfb21a35 Almost got a lot of bugs fixed. 2023-03-26 22:21:44 +02:00
sebastian
d49e2401bf added file suffix and check 2023-03-26 00:09:47 +01:00
Samuel Hammersberg
7e246a94e5 Fixed a segfault. 2023-03-24 19:57:49 +01:00
sebastianselander
f531afb3ab added comment when codegen ok 2023-03-24 19:04:29 +01:00
Samuel Hammersberg
3e31fe0ea5 The compiler now also runs the outputed program. 2023-03-24 18:52:12 +01:00
Samuel Hammersberg
e500c70529 Programs are now actually compiled all the way through. 2023-03-24 18:46:47 +01:00
sebastianselander
e0c78f5783 debug for parse tree 2023-03-24 18:32:33 +01:00
sebastianselander
b4cae11c0d added debug info 2023-03-24 18:30:47 +01:00
Samuel Hammersberg
23c174607b temp merge 2023-03-24 18:23:59 +01:00
sebastianselander
56ccd793ac more error messages and better unification 2023-03-24 18:21:07 +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
sebastianselander
3c2cb1a713 new good version works 2023-03-24 17:06:40 +01:00
sebastianselander
ce3971cf75 renamed stuff 2023-03-24 12:24:08 +01:00
Samuel Hammersberg
75fa232e21 No more warnings, but everything to do with datatypes is outcommented. 2023-03-23 21:35:52 +01:00
sebastianselander
e3df4192bb created dummy monomorphizer 2023-03-23 17:20:19 +01:00
sebastianselander
42c8ebc7b6 Making progress towards finished product 2023-03-23 16:49:49 +01:00
Samuel Hammersberg
350cd3b0e9 Started importing Sebastian's new typechecker. 2023-03-08 11:01:07 +01:00
Samuel Hammersberg
d5dd7896d8 Moved modules into a proper folder structure. 2023-03-08 10:35:07 +01:00
Samuel Hammersberg
ac0ac2dac7 Removed a few imports. 2023-03-08 10:27:39 +01:00
Samuel Hammersberg
2af00da482 Renamed the compile function to generate code 2023-03-08 10:25:53 +01:00
Samuel Hammersberg
832efbcdd8 Gave the code generator a proper module name. 2023-03-08 10:24:52 +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
fe4533c7ae Added an option to output some debug info. 2023-02-20 14:39:56 +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
Martin Fredin
3fe990ceaa Don't run interpreter by default 2023-02-12 13:01:12 +01:00
Martin Fredin
d67eddcf0f Fix interpreter 2023-02-11 11:04:39 +01:00
Martin Fredin
e212c79a44 Revert back to one lambda par, and fix issues with lambda lifter 2023-02-11 09:59:26 +01:00
Martin Fredin
8688b303ac Fix unnecessary supercombinator issue 2023-02-10 16:45:33 +01:00
Martin Fredin
8663f2ea50 Some clean up and documenting 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
69254f8032 Finish Lambda Lifter 2023-02-10 16:45:33 +01:00
Martin Fredin
2a48b7477e Implement lambda lifting passes: freeVars, abstract, and rename 2023-02-10 16:45:33 +01:00
Martin Fredin
64ee4dc432 Implement basic interpreted language 2023-01-20 14:12:04 +01:00
Martin Fredin
7caadcbeb9 Use src instead of app 2023-01-17 15:34:32 +01:00
Renamed from app/Main.hs (Browse further)