CLPFD HTML formatting error
Closed this issue · 1 comments
toth-dev commented
When trying to print an FD-variable, https://swish.swi-prolog.org/ gives the following error:
:- use_module(library(clpfd)).
A in 1..2, writeln(A).
Type error: `integer' expected, found `'$clpBNR...'(_1698)' (a compound)
In:
[21] throw(error(type_error(integer,...),_1748))
[19] clpfd:attr_unify_hook(clpfd_attr(no,no,no,from_to(...,...),fd_props([],[],[])),'$clpBNR...'(_1832)) at /usr/lib/swipl/library/clp/clpfd.pl:7609
[18] uhook(clpfd,clpfd_attr(no,no,no,from_to(...,...),fd_props([],[],[])),'$clpBNR...'(_1904)) at /usr/lib/swipl/boot/attvar.pl:86
[17] call_all_attr_uhooks(att(clpfd,clpfd_attr(no,no,no,...,...),[]),'$clpBNR...'(_1970)) at /usr/lib/swipl/boot/attvar.pl:63
[16] '$wakeup'(wakeup(att(clpfd,...,[]),'$clpBNR...'(_2028),[])) at /usr/lib/swipl/boot/attvar.pl:58
[15] term_html:portray('$clpBNR...'(_2082),_2086{depth:0,max_depth:1000000000,module:'5486277c-87b8-4012-b0e9-736868d96db7',priority:1200},_2076,_2078) at /usr/share/swi-prolog/pack/clpBNR/prolog/clpBNR/ia_utilities.pl:115
[14] term_html:any('$clpBNR...'(_2154),_2086{depth:0,max_depth:1000000000,module:'5486277c-87b8-4012-b0e9-736868d96db7',priority:1200},_2148,_2150) at /usr/lib/swipl/library/ext/http/http/term_html.pl:100
[13] term_html:term('$clpBNR...'(_2226),'<garbage_collected>','<garbage_collected>',_2222) at /usr/lib/swipl/library/ext/http/http/term_html.pl:86
[12] html_write:do_expand('<garbage_collected>',pengines_io,'<garbage_collected>','<garbage_collected>') at /usr/lib/swipl/library/ext/http/http/html_write.pl:429
[11] html_write:html_expand(\term(...,...),pengines_io,_2324,_2326) at /usr/lib/swipl/library/ext/http/http/html_write.pl:408
[10] html_write:qhtml('<garbage_collected>',pengines_io,'<garbage_collected>',_2386) at /usr/lib/swipl/library/ext/http/http/html_write.pl:397
[8] html_write:do_expand('<garbage_collected>',pengines_io,'<garbage_collected>',_2436) at /usr/lib/swipl/library/ext/http/http/html_write.pl:481
[7] html_write:html_expand(span(class(writeln),[...|...]),pengines_io,[<,span|...],[]) at /usr/lib/swipl/library/ext/http/http/html_write.pl:408
[4] call_dcg('<garbage_collected>','<garbage_collected>',[]) at /usr/lib/swipl/boot/dcg.pl:359
[1] pengines_io:send_html('<garbage_collected>') at /usr/lib/swipl/library/ext/pengines/pengines_io.pl:408
Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail.
A in 1..2, writeln(A).
This didn't happen when I cloned the repo and ran it locally, so I can't really debug it any further.
JanWielemaker commented
Thanks. Conflict from a bit too aggressive portray rule in library(clpBNR). Pushed a fix. Should become available with the next update of SWISH.