Commit graph

77 commits

Author SHA1 Message Date
sebastianselander
73dc2e4b6a Inference on most expressions. HM based.
Still have to figure out how to infer type of lambda variables, as well
as how function application on polymorphic should work
2023-02-13 12:17:49 +01:00
Samuel Hammersberg
7c1e1d57a0 Merge remote-tracking branch 'origin/main' into llvm_testing 2023-02-12 13:17:45 +01:00
Samuel Hammersberg
5d5a610cca Made compiler state more generic, and compile no longer outputs IO and instead returns the result. 2023-02-11 14:12:27 +01:00
Martin Fredin
d67eddcf0f Fix interpreter 2023-02-11 11:04:39 +01:00
Martin Fredin
8c094236aa Add auxiliary module 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
Samuel Hammersberg
e7ef268c12 Splat LLVM Ir into its own file. 2023-02-10 16:08:45 +01:00
sebastianselander
a1e9624d5e TTGing the lambda lifter 2023-02-10 12:09:08 +01:00
sebastianselander
f4f1786be3 Revert "Merge branch 'typechecking' into codegen-martin-3"
This reverts commit e000e5159f, reversing
changes made to 3ac8377fa0.
2023-02-10 10:46:09 +01:00
sebastianselander
e000e5159f Merge branch 'typechecking' into codegen-martin-3 2023-02-10 10:33:15 +01:00
Martin Fredin
07bec3e7ef Add auxiliary module 2023-02-09 20:24:06 +01:00
Martin Fredin
1f47288fcf Implement lambda lifting passes: freeVars, abstract, and rename 2023-02-09 05:19:51 +01:00
sebastianselander
84eb430c41 relaxed base dependency and added overwrite 2023-02-08 21:40:27 +01:00
Patrik Jansson
6607173b93 Typo fix (to check access). 2023-02-08 21:40:27 +01:00
Samuel Hammersberg
f8d320bb6d Heavily shorted down the emitAdd function, and added a emitInt function. 2023-02-04 12:43:47 +01:00
Samuel Hammersberg
819f4c9406 Made a simple code generator that outputs to LLVM IR 2023-02-03 16:59:36 +01:00
sebastianselander
2a3757f391 relaxed base dependency and added overwrite 2023-02-03 11:29:42 +01:00
Patrik Jansson
8fd7966fd9 Typo fix (to check access). 2023-02-03 11:12:44 +01:00
sebastianselander
be3fcfc9e3 Typeinference/checking on expressions done.
Simplified the typechecker a bit, removed GADT solution for now.
Still not fully working
2023-01-24 16:39:22 +01:00
Samuel Hammersberg
fd64a7e669 Added a function to load the Standard LLVM library at runtime. 2023-01-24 11:38:33 +01:00
sebastianselander
b6b2dfa25f Some work on a typechecker 2023-01-23 17:17:06 +01:00
Samuel Hammersberg
213e47097e Split the compiler into it's own module and added a file for the LLVM standard library. 2023-01-23 16:57:32 +01:00
Samuel Hammersberg
b389e397b6 Started working on a simple compiler. 2023-01-22 19:43:08 +01:00
Martin Fredin
92bb18a568 Update cabal file 2023-01-20 14:00:12 +01:00
Martin Fredin
7caadcbeb9 Use src instead of app 2023-01-17 15:34:32 +01:00
Martin Fredin
157ee636e8 Change base to version which is compatible with ghc.9.2.4 2023-01-17 15:33:52 +01:00
sebastianselander
47df84f911 cabal init and added formatting options 2023-01-17 11:42:40 +01:00