Added η-expander module and removed EAdd from grammar.

This commit is contained in:
sebastianselander 2023-05-12 16:25:03 +02:00
parent c3bcdfa81b
commit 8b92dd9194
8 changed files with 113 additions and 18 deletions

View file

@ -369,6 +369,7 @@ preludeFuns def (Ident xs) arg1 arg2
| "$langle$$langle$" `isPrefixOf` xs = pure $ Icmp LLSlt I8 arg1 arg2
| "$langle$" `isPrefixOf` xs = pure $ Icmp LLSlt I64 arg1 arg2
| "$minus$" `isPrefixOf` xs = pure $ Sub I64 arg1 arg2
| "$plus$" `isPrefixOf` xs = pure $ Add I64 arg1 arg2
| "printChar$" `isPrefixOf` xs = do
pure . UnsafeRaw $
"add i16 0,0\n call void (ptr, ...) @printf(ptr noundef @.char_print_no_nl, i8 noundef " <> toIr arg1 <> ")\n"