Open rrooij opened 2 years ago
!? From html_write.pl:
:- module(html_write,
[ reply_html_page/2, % :Head, :Body
reply_html_page/3, % +Style, :Head, :Body
% Basic output routines
page//1, % :Content
page//2, % :Head, :Body
...
In html_header.pl:
:- autoload(html_write,
[ print_html/2, print_html/1, page/4, html/3,
html_print_length/2
]).
page//2
is the same as page/4
. Ok, it would be more elegant to use page//2
consistently but that is detail. The imports are generated automatically and this code doesn't yet handle DCGs separately.
Note that autoload/2 is interpreted as use_module/2 if autoloading is disabled.
Thanks for explaining this. I didn't know about the two slashes. :smile:
The error still remains a mystery though! I'm trying to make a reproducible small example.
Certain meta-predicates like page/4 are defined in
html_write.pl
and used elsewhere (for instance, inhttp_header.pl
). They are explicitly imported in http_head but not exported in html_write.This results in socket connection errors when you run in a server in SWI Prolog with autoloading disabled: