• R/O
  • SSH

Joypy: Commit

Main interpreter and library.


Commit MetaInfo

Revisionb9f4b2453b12043726837caa087a041ca427b410 (tree)
Time2019-08-12 07:12:56
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

Don't shadow funcs and combos.

Change Summary

Incremental Difference

diff -r 3d02093c3fe9 -r b9f4b2453b12 thun/gnu-prolog/defs.pl
--- a/thun/gnu-prolog/defs.pl Sun Aug 11 14:56:20 2019 -0700
+++ b/thun/gnu-prolog/defs.pl Sun Aug 11 15:12:56 2019 -0700
@@ -17,11 +17,9 @@
1717 def(disenstacken,[?,[uncons,?],loop,pop]).
1818 def(down_to_zero,[[0,>],[dup,--],while]).
1919 def(drop,[[rest],times]).
20-def(dupd,[[dup],dip]).
2120 def(dupdd,[[dup],dipd]).
2221 def(dupdipd,[dup,dipd]).
2322 def(enstacken,[stack,[clear],dip]).
24-def(flatten,[[],swap,[concat],step]).
2523 def(fork,[[i],app2]).
2624 def(fourth,[rest,third]).
2725 def(gcd,[true,[tuck,mod,dup,0,>],loop,pop]).
@@ -52,7 +50,6 @@
5250 def(rrest,[rest,rest]).
5351 def(run,[[],swap,infra]).
5452 def(second,[rest,first]).
55-def(shift,[uncons,[swons],dip]).
5653 def(shunt,[[swons],step]).
5754 def(size,[0,swap,[pop,++],step]).
5855 def(split_at,[[drop],[take],clop]).
@@ -64,7 +61,6 @@
6461 def(ternary,[binary,popd]).
6562 def(third,[rest,second]).
6663 def(unary,[nullary,popd]).
67-def(unit,[[],cons]).
6864 def(unquoted,[[i],dip]).
6965 def(unswons,[uncons,swap]).
7066 def(while,[swap,[nullary],cons,dup,dipd,concat,loop]).
diff -r 3d02093c3fe9 -r b9f4b2453b12 thun/gnu-prolog/meta-defs.pl
--- a/thun/gnu-prolog/meta-defs.pl Sun Aug 11 14:56:20 2019 -0700
+++ b/thun/gnu-prolog/meta-defs.pl Sun Aug 11 15:12:56 2019 -0700
@@ -6,9 +6,12 @@
66
77 joy_def(def(Def, Body)) --> symbol(Def), blanks, "==", joy_parse(Body).
88
9-joy_defs --> blanks, joy_def(Def), {assert_def(Def)}, blanks, joy_defs.
9+joy_def --> joy_def(Def), {ignore(assert_def(Def))}.
10+
11+joy_defs --> blanks, joy_def, blanks, joy_defs.
1012 joy_defs --> [].
1113
14+
1215 assert_defs(DefsFile) :-
1316 read_file_to_codes(DefsFile, Codes, []),
1417 phrase(joy_defs, Codes).
@@ -42,3 +45,7 @@
4245
4346 print_def(Stream, Def) :- write(Stream, Def), write(Stream, `.`), nl(Stream).
4447
48+
49+ignore(Goal) :- Goal, !.
50+ignore(_).
51+
Show on old repository browser