Scryer-prolog: atom_chars/2 loops

Created on 6 Apr 2019  路  3Comments  路  Source: mthom/scryer-prolog

?- L=[a|L], atom_chars(A,L),false.
**LOOPS**

(I do not look at your source code, but it would be ideal to stick to the must_be/2 and can_be/2 convention, and then you have the complex can_be_list/1 written only once for all.)

Most helpful comment

Same for term_variables/2. Do you really encode this on a case-by-case basis? There are so many can_be_list tests. Should they all be tested manually?

All 3 comments

Same for term_variables/2. Do you really encode this on a case-by-case basis? There are so many can_be_list tests. Should they all be tested manually?

error: exception thrown: error(type_error(list, [a | _22]), atom_chars/3)

This should rather read [a,a,a,a,a...] so you need a general mechanism for handling infinite terms.

... and for printing them in a finite manner at the toplevel

Close so that the actual issue is now in #117

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XVilka picture XVilka  路  3Comments

triska picture triska  路  3Comments

jburse picture jburse  路  5Comments

notoria picture notoria  路  4Comments

triska picture triska  路  3Comments