mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
interpreter: recursive module fix, more tests
This commit is contained in:
parent
58f0bfc0b9
commit
b6b843fb44
10 changed files with 43 additions and 12 deletions
3
byterun/regression/Dep2.i
Normal file
3
byterun/regression/Dep2.i
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
I,Std;
|
||||
F,f;
|
||||
F,g;
|
||||
3
byterun/regression/Dep2.lama
Normal file
3
byterun/regression/Dep2.lama
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import Dep;
|
||||
|
||||
public fun g(a, b) { a * b }
|
||||
0
byterun/regression/dep_test002.input
Normal file
0
byterun/regression/dep_test002.input
Normal file
3
byterun/regression/dep_test002.lama
Normal file
3
byterun/regression/dep_test002.lama
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import Dep2;
|
||||
|
||||
f(1, 2)
|
||||
0
byterun/regression/dep_test003.input
Normal file
0
byterun/regression/dep_test003.input
Normal file
4
byterun/regression/dep_test003.lama
Normal file
4
byterun/regression/dep_test003.lama
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Fun;
|
||||
import List;
|
||||
|
||||
write(fix (fun (f) {fun (n) {if n == 1 then 1 else n * f (n-1) fi}})(5))
|
||||
Loading…
Add table
Add a link
Reference in a new issue