scryer-prolog
scryer-prolog copied to clipboard
Top level: Default for string chopping should be much larger
?- length(L,11).
L = [_A,_B,_C,_D,_E,_F,_G,_H,_I,_J|...]. % OK
?- X = "abcdefghijklmnopqrstuvwxyz".
X = "abcdefghijklmnopqrs ...".
Much more should be printed! At least 4 times the size of the printing depth
@mthom: This is not an enhancement. It is extremely irritating, everytime I want to use Scryer, I need to resort to atom_chars/2 to convert the list into an atom. Then, for some reason you do not have a problem with limitations.
And: do not write out valid syntax since this can be easily misinterpreted.
If you want to see the entire string, you can press w on the toplevel to print it:
?- X = "abcdefghijklmnopqrstuvwxyz" ; 0=1. X = "abcdefghijklmnopqrs ..." % press w X = "abcdefghijklmnopqrstuvwxyz" ; false.
Thanks, and there is no way to get that behavior by default?
Is this w thing really a good solution? After all it produces a non-sensical transscript.
Here is an even odder phenomenon:
?- [user].
q("abcdefghijklmnopqrstuvwxyz").
q(E+t):-q(E).
?- q(L).
L = "abcdefghijklmnopqrs ..."
; L = "abcdefghijklmnopqr ..."+t % does this make sense? And all below
; L = "abcdefghijklmnopq ..."+t+t
; L = "abcdefghijklmnop ..."+t+t+t
; L = "abcdefghijklmno ..."+t+t+t+t
; L = "abcdefghijklmn ..."+t+t+t+t+t
; L = "abcdefghijklm ..."+t+t+t+t+t+t
; L = "abcdefghijkl ..."+t+t+t+t+t+t+t
; L = "abcdefghijk ..."+t+t+t+t+t+t+t+t
; L = "abcdefghij ..."+t+t+t+t+t+t+t+t+t
; L = "abcdefghi ..."+t+t+t+t+t+t+t+t+t+t
; L = "abcdefgh ..."+t+t+t+t+t+t+t+t+t+t+t
; L = "abcdefg ..."+t+t+t+t+t+t+t+t+t+t+t+t
; L = "abcdef ..."+t+t+t+t+t+t+t+t+t+t+t+t+t
; L = "abcde ..."+t+t+t+t+t+t+t+t+t+t+t+t+t+t
; L = "abcd ..."+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t
; L = "abc ..."+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t
; L = "ab ..."+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t
; L = "a ..."+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t
; L = "abcdefghijklmnopqrstuvwxyz"+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t % big surprise
; L = ... +t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t
; L = ... + ... +t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t
; ... .
I have filed #1988 so that the default can be configured with the Prolog flag answer_write_options.
Example:
?- Cs = "abcdefghijklmnopqrstuvwxyz". Cs = "abcdefghijklmnopqrs ...". ?- set_prolog_flag(answer_write_options, [max_depth(100)]). true. ?- Cs = "abcdefghijklmnopqrstuvwxyz". Cs = "abcdefghijklmnopqrstuvwxyz".