Imports (no infixes yet; does not work because of the GC duplicate symbols)

This commit is contained in:
Dmitry Boulytchev 2019-11-27 03:14:25 +03:00
parent 5f673e766c
commit cf5d0f1bc7
15 changed files with 161 additions and 62 deletions

View file

@ -7,7 +7,7 @@ RC=../../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff -u $@.log orig/$@.log
@RC_RUNTIME=../../runtime $(RC) -I . $< && cat $@.input | ./$@ > $@.log && diff -u $@.log orig/$@.log
clean:
rm -f test*.log *.s *~ $(TESTS)

View file

@ -0,0 +1 @@
called with this one

View file

@ -1,5 +1,3 @@
external fun printf ();
fun insert (tree, value) {
case tree of
Empty -> return Node (value, Empty, Empty)

View file

@ -1,5 +1,3 @@
external fun printf ();
fun collect_ints_acc (v, tail) {
local i;

View file

@ -1,5 +1,3 @@
external fun printf ();
local lists = [
{},
{1, 2, 3, 4},

View file

@ -1,5 +1,3 @@
external fun printf ();
fun hd (l) {
case l of
h : _ -> return h

View file

@ -0,0 +1,5 @@
public fun from_test005 (s) {
printf ("called with %s\n", s)
}
from_test005 ("this one")

View file

@ -0,0 +1 @@
0

View file

@ -0,0 +1,3 @@
import test005;
from_test005 ("that one")

View file

@ -0,0 +1 @@
0