• R/O
  • SSH

Joypy: Commit

Main interpreter and library.


Commit MetaInfo

Revisione270947ee8c77e8cb7ad2f99d7c793c8f24aaecd (tree)
Time2019-07-21 09:19:35
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

WTF error handler.

Made it check that the unknown term really isn't a literal, definition, function, or combinator.

Change Summary

Incremental Difference

diff -r b85fe6c1d110 -r e270947ee8c7 thun/thun.pl
--- a/thun/thun.pl Sat Jul 20 16:57:19 2019 -0700
+++ b/thun/thun.pl Sat Jul 20 17:19:35 2019 -0700
@@ -88,7 +88,15 @@
8888 thun([Combo|E], Si, So) :- combo(Combo, Si, S, E, Eo), thun(Eo, S, So).
8989
9090 % Some error handling.
91-% thun([Unknown|E], Si, So) :- write("wtf? "), writeln(Unknown), So = [[Unknown|E]|Si].
91+
92+thun([Unknown|E], Si, So) :- damned_thing(Unknown), write("wtf? "), writeln(Unknown), So = [[Unknown|E]|Si].
93+
94+damned_thing(It) :-
95+ \+ literal(It),
96+ \+ (It ≡ _),
97+ \+ func(It, _, _),
98+ \+ combo(It, _, _, _, _).
99+
92100
93101 /*
94102 Literals
Show on old repository browser