diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-21 13:20:25 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-21 13:21:02 -0500 |
commit | 10dbaa3391e8ad4e076a6fcd6f9790d7f625552a (patch) | |
tree | 1628328b590799e84daf0593f8eae776038338ac /test.toc | |
parent | 8406747331eef16a525f0dbf4d26445d243e19d1 (diff) |
only load libraries once
Diffstat (limited to 'test.toc')
-rw-r--r-- | test.toc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -24,6 +24,12 @@ foo ::= fn() i32 { puts("Hey") }; +malloc :: fn(u64) &u8 = #foreign "malloc", "libc.so.6"; + +sqrt :: fn(f64) f64 = #foreign "sqrt", "libm.so"; + main ::= fn() { x ::= foo(); + y ::= malloc(10); + sq2 ::= sqrt(2); };
\ No newline at end of file |