Sample 1lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
parent(alice, bob) :-
    likes(alice, chocolate),
    likes(bob, chocolate),
    happy(bob). % Bob's always happy.
parent(alice, bob) :-
    likes(alice, chocolate),
    likes(bob, chocolate),
    happy(bob).              % Bob's always happy.
parent(alice, bob) :-
    likes(alice, chocolate),
    likes(bob, chocolate),
    happy(bob). % Bob's always happy.
Sample 2lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
my_predicate(X) :-
    X > 0, % this is X
    Y is X * 2,
    Z is Y + 3, % this is Z
    W is Z - 5,
    Result is W / 2, % this is result
    Result =:= 10.
my_predicate(X) :-
    X > 0,           % this is X
    Y      is X * 2,
    Z      is Y + 3, % this is Z
    W      is Z - 5,
    Result is W / 2, % this is result
    Result =:= 10.
my_predicate(X) :-
    X > 0, % this is X
    Y is X * 2,
    Z is Y + 3, % this is Z
    W is Z - 5,
    Result is W / 2, % this is result
    Result =:= 10.
Sample 3prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
value(X) :- a(X) ->
 b(X) ; c(X).
value(X) :-
    a(X)
    -> b(X)
    ;  c(X).
value(X) :- a(X) ->
        b(X) ; c(X).
Sample 4lsp formatter: error
Original Input prolog-fmt lsp_server formatter
test :- hello, one
; two ; three ; four, bob, likes, apples.
test :-
    hello, one
           ; two
           ; three
           ; four,
           bob, likes, apples.
FORMATTING ERROR
Sample 5prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
test2 :- a ;
         b ; c ; d ; e, f, g.
test2 :- a
         ; b
         ; c
         ; d
         ; e, f, g.
test2 :- a ;
    b ; c ; d ; e, f, g.
Sample 6prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
kept(X) ==> guard(X) | first(X), second(X).
remove(X) <=> body(X).
keep(X) \ remove(X) <=> guard(X) | body(X).
kept(X) ==>
    guard(X)
    | first(X),
    second(X).

remove(X) <=> body(X).

keep(X) \ remove(X) <=>
    guard(X)
    | body(X).
kept(X) ==> guard(X) | first(X), second(X).
Sample 7lsp formatter: error
Original Input prolog-fmt lsp_server formatter
broken(X) ==> guard(X) | body((X).
broken(X) ==> guard(X) | body((X).
BLANK OUTPUT
Sample 8lsp formatter: error
Original Input prolog-fmt lsp_server formatter
broken(X) :- first(X), second((X).
broken(X) :- first(X), second((X).
BLANK OUTPUT
Sample 9prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
broken(X) :- first(X), second((X).

non_broken(_) :- a, b,
                 c, d, e.
broken(X) :- first(X), second((X).

non_broken(_) :-
    a,
    b,
    c,
    d,
    e.


non_broken(_) :- a, b,
    c, d, e.
Sample 10prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
same(X) :- first(X).
same(X) :- second(X).
same(X,Y) :- first(X,Y).
same(X,Y) :- second(X,Y).
other(X) :- first(X).
other(X) :- second(X).
same(X)   :- first(X).
same(X)   :- second(X).

same(X,Y) :- first(X,Y).
same(X,Y) :- second(X,Y).


other(X) :- first(X).
other(X) :- second(X).
same(X) :- first(X).
same(X) :- second(X).
same(X, Y) :- first(X, Y).
same(X, Y) :- second(X, Y).
other(X) :- first(X).
other(X) :- second(X).
Sample 11prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
same(X) :- first(X),
           not_a_first(X).
same(XYZ) :- second(XYZ).
same(X,YYY) :- first(X,YYY).
same(X,Y) :- second(X,Y).
other(X) :- first(X).
other(X) :- second(X).
same(X) :-
    first(X),
    not_a_first(X).

same(XYZ) :- second(XYZ).

same(X,YYY) :- first(X,YYY).
same(X,Y)   :- second(X,Y).


other(X) :- first(X).
other(X) :- second(X).
same(X) :- first(X),
    not_a_first(X).
same(XYZ) :- second(XYZ).
same(X, YYY) :- first(X, YYY).
same(X, Y) :- second(X, Y).
other(X) :- first(X).
other(X) :- second(X).
Sample 12lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
before(X) :- first(X), second(X).
grouped(X) :- first(X).
grouped(X) :- second(X).
after(X) :- first(X), second(X).
before(X) :-
    first(X),
    second(X).


grouped(X) :- first(X).
grouped(X) :- second(X).


after(X) :-
    first(X),
    second(X).
before(X) :- first(X), second(X).
grouped(X) :- first(X).
grouped(X) :- second(X).
after(X) :- first(X), second(X).
Sample 13all equal
Original Input prolog-fmt lsp_server formatter
:- use_module(a).
:- use_module(b).

:- initialization(main).
:- setting(value).
:- use_module(a).
:- use_module(b).

:- initialization(main).
:- setting(value).
:- use_module(a).
:- use_module(b).

:- initialization(main).
:- setting(value).
Sample 14prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
value([a,b,
c,d,e]).
value([
    a, b,
    c, d,
    e
]).
value([a, b,
       c, d, e]).
Sample 15prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
value([outer({a,
b}), second,
third]).
value([
    outer({
        a,
        b
    }), second,
    third
]).
value([outer({a,
              b}), second,
       third]).
Sample 16prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
head(a,
b) :- body([one,
two]).
head(
    a,
    b
) :-
    body([
        one,
        two
    ]).
head(a,
     b) :- body([one,
                 two]).
Sample 17prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
head(a,
b) :- body(
[one,
two]).
head(
    a,
    b
) :-
    body(
        [
            one,
            two
        ]
    ).
head(a,
     b) :- body(
        [one,
         two]).
Sample 18prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
values :- A= 123,
B = 2,
C = 3,

% Hi there!

D = 4,
Evening = 5,
Four = 6.
values :-
    A       = 123,
    B       =   2,
    C       =   3,

% Hi there!

    D       =   4,
    Evening =   5,
    Four    =   6.
values :- A= 123,
    B = 2,
    C = 3,

    % Hi there!

    D = 4,
    Evening = 5,
    Four = 6.
Sample 19prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
value :- ST = #{
step: 0,
history: [],
current: none,
logged: false
}.
value :-
    ST = #{
        step:    0,
        history: [],
        current: none,
        logged:  false
    }.
value :- ST = #{
                  step: 0,
                  history: [],
                  current: none,
                  logged: false
    }.
Sample 20prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
%heading
%details
fact.
% heading
% details

fact.
%heading
%details
fact
Sample 21prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
%portray(s(S,L,V,H)) :- 
  %format("Step: ~d", [S]).
% portray(s(S,L,V,H)) :- 
% format("Step: ~d", [S]).
%portray(s(S,L,V,H)) :- 
%format("Step: ~d", [S]).
Sample 22prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
first.
   


second.




third.
first.

second.

third.
first



second




third
Sample 23lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
% first



% second
% first


% second
% first



% second
Sample 24prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
value(X) :- first(X), % inline
  % line
 second(X).
value(X) :-
    first(X),  % inline
    % line
    second(X).
value(X) :- first(X), % inline
    % line
    second(X).
Sample 25lsp formatter: error
Original Input prolog-fmt lsp_server formatter
likes(Person, Food) :-
    likes_food(Person, Food),
    good_for_health(Food)
hates(Person, Thing) :-
    dislikes(Person, Thing),
    dangerous(Thing),
    not_allowed(Person, Thing).
likes(Person, Food) :-
    likes_food(Person, Food),
    good_for_health(Food) hates(Person, Thing) :- dislikes(Person, Thing),
    dangerous(Thing),
    not_allowed(Person, Thing).
BLANK OUTPUT
Sample 26prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
state(S) <=> \+ workable_state(S) | true.
state(S) ==> workable_state(S) | transition(S, visit_page).

transition(S, visit_page), is_page(P) ==> workable_state(S) |  transition(S, #{visit: P}).

transition(S, #{visit: P} ) ==>  workable_state(S), 
                            \+ memberchk(visit(_), S.history) |
                            next_state(S, visit(P)).
state(S) <=>
    \+ workable_state(S)
    | true.

state(S) ==>
    workable_state(S)
    | transition(S, visit_page).


transition(S, visit_page), is_page(P) ==>
    workable_state(S)
    | transition(S, #{visit: P}).

transition(S, #{visit: P} ) ==>
    workable_state(S),
    \+ memberchk(visit(_), S.history)
    | next_state(S, visit(P)).

state(S) ==> workable_state(S) | transition(S, visit_page).

transition(S, visit_page), is_page(P) ==> workable_state(S) |  transition(S, #{visit: P}).

transition(S, #{visit: P}) ==>  workable_state(S),
                                \+ memberchk(visit(_), S.history) |
                                    next_state(S, visit(P)).
Sample 27lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
% =
% Hello !!!
% =
% =========
% Hello !!!
% =========
% =
% Hello !!!
% =
Sample 28all equal
Original Input prolog-fmt lsp_server formatter
% % %
% Hello !!!
% % %
% % %
% Hello !!!
% % %
% % %
% Hello !!!
% % %
Sample 29all equal
Original Input prolog-fmt lsp_server formatter
% AAAAAAAAAAA
% /
% AAAAAAAAAAA
% /
% AAAAAAAAAAA
% /
Sample 30lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
test(_) :-
    aaaaaaaaa, % inline 1
    bbb, % inline 2
    cccccc. % inline 3
test(_) :-
    aaaaaaaaa, % inline 1
    bbb,       % inline 2
    cccccc.    % inline 3
test(_) :-
    aaaaaaaaa, % inline 1
    bbb, % inline 2
    cccccc. % inline 3
Sample 31lsp formatter: error
Original Input prolog-fmt lsp_server formatter
:- chr_constraint state/1, transition/2, is_page/1, insert_pages/0.
:- chr_constraint
     state/1,
     transition/2,
     is_page/1,
     insert_pages/0.
BLANK OUTPUT
Sample 32lsp formatter: error
Original Input prolog-fmt lsp_server formatter
:- chr_constraint one/1.
:- chr_constraint one/1.
BLANK OUTPUT
Sample 33lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
% vim: ft=prolog
main :- this.
% vim: ft=prolog

main :- this.
% vim: ft=prolog
main :- this.
Sample 34lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
% vim: ft=prolog
main :-
    this,


    that.
% vim: ft=prolog

main :-
    this,

    that.
% vim: ft=prolog
main :-
    this,


    that.
Sample 35lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
main :-
    one,


    two,


    three.
main :-
    one,

    two,

    three.
main :-
    one,


    two,


    three.
Sample 36all equal
Original Input prolog-fmt lsp_server formatter
%!  make_boundary(+Inputs, ?Boundary) is det.
%?- make_boundary([], Boundary).
%@ true.
%
%   Generate a boundary.  This should check all input sources whether
%   the boundary is enclosed.
%!  make_boundary(+Inputs, ?Boundary) is det.
%?- make_boundary([], Boundary).
%@ true.
%
%   Generate a boundary.  This should check all input sources whether
%   the boundary is enclosed.
%!  make_boundary(+Inputs, ?Boundary) is det.
%?- make_boundary([], Boundary).
%@ true.
%
%   Generate a boundary.  This should check all input sources whether
%   the boundary is enclosed.
Sample 37prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
queen_value_truth(Q, N, 1) :- format("~w ~w q~n", [Q,N]).

queen_value_truth(Q, N, 0) :- format("~w ~w i~n", [Q,N]).
queen_value_truth(Q, N, _) :- format("~w ~w c~n", [Q,N]), false.
queen_value_truth(Q, N, 1) :- format("~w ~w q~n", [Q,N]).
queen_value_truth(Q, N, 0) :- format("~w ~w i~n", [Q,N]).

queen_value_truth(Q, N, _) :-
    format("~w ~w c~n", [Q,N]),
    false.
queen_value_truth(Q, N, 1) :- format("~w ~w q~n", [Q, N]).

queen_value_truth(Q, N, 0) :- format("~w ~w i~n", [Q, N]).
queen_value_truth(Q, N, _) :- format("~w ~w c~n", [Q, N]), false.
Sample 38lsp formatter: error
Original Input prolog-fmt lsp_server formatter
predicate :-
(   rule(C,R) ->
    Ds = RDs,
    Rs = [R | RRs],
    OCs = ROCs
;   C = (handler _) ->
    format('CHR compiler WARNING: ~w.\n',[C]),
    format('    `-->  SICStus compatibility: ignoring handler/1 declaration.\n',[]),
    Ds = RDs,
    Rs = RRs,
    OCs = ROCs
;   C = (:- chr_option(OptionName,OptionValue)) ->
    handle_option(OptionName,OptionValue),
    Ds = RDs,
    Rs = RRs,
    OCs = ROCs
;   Ds = RDs,
    Rs = RRs,
    OCs = [C|ROCs]
),
partition_clauses(Cs,RDs,RRs,ROCs,Mod).
predicate :-
    (  rule(C,R) ->
       Ds = RDs,
       Rs = [R | RRs],
       OCs = ROCs
    ;  C = (handler _) ->
       format('CHR compiler WARNING: ~w.\n',[C]),
       format('    `-->  SICStus compatibility: ignoring handler/1 declaration.\n',[]),
       Ds = RDs,
       Rs = RRs,
       OCs = ROCs
    ;  C = (:- chr_option(OptionName,OptionValue)) ->
       handle_option(OptionName,OptionValue),
       Ds = RDs,
       Rs = RRs,
       OCs = ROCs
    ;  Ds = RDs,
       Rs = RRs,
       OCs = [C|ROCs]
    ),
    partition_clauses(Cs,RDs,RRs,ROCs,Mod).
BLANK OUTPUT
Sample 39lsp formatter: error
Original Input prolog-fmt lsp_server formatter
first :-
    one,
    two,
    three,
    second

:- alpha, beta.
first :-
    one,
    two,
    three,
    second :- alpha,
    beta.
BLANK OUTPUT
Sample 40prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
state(S) <=> true.

visit(P) ==> transition(P).

keep(X) \ remove(X) <=> updated(X).
state(S) <=> true.

visit(P) ==> transition(P).

keep(X) \ remove(X) <=> updated(X).


visit(P) ==> transition(P).
Sample 41all equal
Original Input prolog-fmt lsp_server formatter
normal_form(A ==> B, NF) :- normal_form(not(A) \/ B, NF).
normal_form(A ==> B, NF) :- normal_form(not(A) \/ B, NF).
normal_form(A ==> B, NF) :- normal_form(not(A) \/ B, NF).
Sample 42all equal
Original Input prolog-fmt lsp_server formatter
state(S0, S), [S] --> [S0].
state(S0, S), [S] --> [S0].
state(S0, S), [S] --> [S0].
Sample 43all equal
Original Input prolog-fmt lsp_server formatter
state(S0, S), [S] --> [S0].

other(S0, S), [S] --> [S0].
state(S0, S), [S] --> [S0].

other(S0, S), [S] --> [S0].
state(S0, S), [S] --> [S0].

other(S0, S), [S] --> [S0].
Sample 44prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
address_domain(localhost:_Port, Domain) =>
    Domain = inet.

address_domain(Iface:_Port, Domain) =>
    catch(ip_name(IP, Iface), error(_,_), fail),
    Domain = inet6.
address_domain(localhost: _Port, Domain) => Domain = inet.

address_domain(Iface:     _Port, Domain) =>
    catch(ip_name(IP, Iface), error(_,_), fail),
    Domain = inet6.
address_domain(localhost:_Port, Domain) =>
    Domain = inet.

address_domain(Iface:_Port, Domain) =>
    catch(ip_name(IP, Iface), error(_, _), fail),
    Domain = inet6.
Sample 45prolog-fmt == lsp formatter
Original Input prolog-fmt lsp_server formatter
format_menu_([N|Ms], M) -->
format_element(M),
"   ",
format_menu_(Ms, N).

format_menu_([], _) --> [].
format_menu_([N|Ms], M) -->
    format_element(M),
    "   ",
    format_menu_(Ms, N).

format_menu_([], _) --> [].
format_menu_([N|Ms], M) -->
    format_element(M),
    "   ",
    format_menu_(Ms, N).

format_menu_([], _) --> [].
Sample 46lsp formatter: error
Original Input prolog-fmt lsp_server formatter
houses :-
England #     = Red,
Spain #       = Dog,
Coffee #      = Green,
Ukraine #     = Tea,
Green #       = Ivory + 1.
houses :-
    England #= Red,
    Spain   #= Dog,
    Coffee  #= Green,
    Ukraine #= Tea,
    Green   #= Ivory + 1.
BLANK OUTPUT
Sample 47prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
problem(1, P) :- % shokyuu
        P = [[1,_,_],
             [_,2,_]].


problem(2, P) :-  % shokyuu
        P = [[_,_,2],
             [_,4,_]].
problem(1, P) :- % shokyuu
    P = [
        [1,_,_],
        [_,2,_]
    ].

problem(2, P) :- % shokyuu
    P = [
        [_,_,2],
        [_,4,_]
    ].
problem(1, P) :- % shokyuu
    P = [[1, _, _],
         [_, 2, _]].


problem(2, P) :-  % shokyuu
    P = [[_, _, 2],
         [_, 4, _]].
Sample 48prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
drawio_wrapper :-
format("
<mxGraphModel grid=\"0\">
 <one-space />
  text  with  repeated  spaces
  <root>
    <mxCell id=\"0\" />
    ~@

    ~@
  </root>
</mxGraphModel>

", [drawio_all_elements, drawio_all_edges]).
drawio_wrapper :-
    format("
<mxGraphModel grid=\"0\">
 <one-space />
  text  with  repeated  spaces
  <root>
    <mxCell id=\"0\" />
    ~@

    ~@
  </root>
</mxGraphModel>

", [drawio_all_elements, drawio_all_edges]).
drawio_wrapper :-
    format("\n<mxGraphModel grid=\"0\">\n <one-space />\n  text  with  repeated  spaces\n  <root>\n    <mxCell id=\"0\" />\n    ~@\n\n    ~@\n  </root>\n</mxGraphModel>\n\n", [drawio_all_elements, drawio_all_edges]).
Sample 49lsp formatter: input unchanged
Original Input prolog-fmt lsp_server formatter
drawio :-
    load_file,
    %open("output.xml", write, Stream),
    %close(Stream),
    drawio_wrapper,
    halt.
drawio :-
    load_file,
%   open("output.xml", write, Stream),
%   close(Stream),
    drawio_wrapper,
    halt.
drawio :-
    load_file,
    %open("output.xml", write, Stream),
    %close(Stream),
    drawio_wrapper,
    halt.
Sample 50prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
#!/usr/bin/env swipl --on-error=halt

:- initialization(main, main).
#!/usr/bin/env swipl --on-error=halt

:- initialization(main, main).


:- initialization(main, main).
Sample 51prolog fmt != lsp formatter
Original Input prolog-fmt lsp_server formatter
:- module(http_server,
          [ http_server/1,        % +Options
            % from thread_httpd
            http_current_server/2,      % ?:Goal, ?Port
            http_server_property/2,     % ?Port, ?Property
            http_server/2,              % :Goal, +Options
            http_workers/2,             % +Port, ?WorkerCount
            http_add_worker/2,          % +Port, +Options
            http_current_worker/2,      % ?Port, ?ThreadID
            http_stop_server/2,         % +Port, +Options
            http_spawn/2,               % :Goal, +Options
            % from http_dispatch
            http_dispatch/1,            % +Request
            http_handler/3,             % +Path, +Predicate, +Options
            http_delete_handler/1,      % +Path
            http_request_expansion/2,   % :Goal, +Rank
            http_reply_file/3,          % +File, +Options, +Request
            http_redirect/3,            % +How, +Path, +Request
            http_404/2,                 % +Options, +Request
            http_switch_protocol/2,     % :Goal, +Options
            http_current_handler/2,     % ?Path, ?Pred
            http_current_handler/3,     % ?Path, ?Pred, -Options
            http_location_by_id/2,      % +ID, -Location
            http_link_to_id/3,          % +ID, +Parameters, -HREF
            http_reload_with_parameters/3, % +Request, +Parameters, -HRE
            % from http_wrapper
            http_current_request/1,     % -Request
            http_peer/2,
            % from http_parameters
            http_parameters/2,          % +Request, -Params
            http_parameters/3,
            % from html_write
            reply_html_page/2,          % :Head, :Body
            html//1,                    % :Content
                                        % Extension support
            (html_meta)/1,              % +Spec
            op(1150, fx, html_meta),
            % from http_json
            reply_json_dict/1,          % +JSON
            reply_json_dict/2,          % +JSON, Options
            http_read_json_dict/2,      % +Request, -Dict
            http_read_json_dict/3,      % +Request, -Dict, +Options
            is_json_content_type/1
          ]).
:- module(
    http_server,
    [
        http_server/1,                 % +Options
        % from thread_httpd
        http_current_server/2,         % ?:Goal, ?Port
        http_server_property/2,        % ?Port, ?Property
        http_server/2,                 % :Goal, +Options
        http_workers/2,                % +Port, ?WorkerCount
        http_add_worker/2,             % +Port, +Options
        http_current_worker/2,         % ?Port, ?ThreadID
        http_stop_server/2,            % +Port, +Options
        http_spawn/2,                  % :Goal, +Options
        % from http_dispatch
        http_dispatch/1,               % +Request
        http_handler/3,                % +Path, +Predicate, +Options
        http_delete_handler/1,         % +Path
        http_request_expansion/2,      % :Goal, +Rank
        http_reply_file/3,             % +File, +Options, +Request
        http_redirect/3,               % +How, +Path, +Request
        http_404/2,                    % +Options, +Request
        http_switch_protocol/2,        % :Goal, +Options
        http_current_handler/2,        % ?Path, ?Pred
        http_current_handler/3,        % ?Path, ?Pred, -Options
        http_location_by_id/2,         % +ID, -Location
        http_link_to_id/3,             % +ID, +Parameters, -HREF
        http_reload_with_parameters/3, % +Request, +Parameters, -HRE
        % from http_wrapper
        http_current_request/1,        % -Request
        http_peer/2,
        % from http_parameters
        http_parameters/2,             % +Request, -Params
        http_parameters/3,
        % from html_write
        reply_html_page/2,             % :Head, :Body
        html//1,                       % :Content
        % Extension support
        (html_meta)/1,                 % +Spec
        op(1150, fx, html_meta),
        % from http_json
        reply_json_dict/1,             % +JSON
        reply_json_dict/2,             % +JSON, Options
        http_read_json_dict/2,         % +Request, -Dict
        http_read_json_dict/3,         % +Request, -Dict, +Options
        is_json_content_type/1
    ]
).
:- module(http_server,
          [ http_server/1,        % +Options
            % from thread_httpd
            http_current_server/2,      % ?:Goal, ?Port
            http_server_property/2,     % ?Port, ?Property
            http_server/2,              % :Goal, +Options
            http_workers/2,             % +Port, ?WorkerCount
            http_add_worker/2,          % +Port, +Options
            http_current_worker/2,      % ?Port, ?ThreadID
            http_stop_server/2,         % +Port, +Options
            http_spawn/2,               % :Goal, +Options
            % from http_dispatch
            http_dispatch/1,            % +Request
            http_handler/3,             % +Path, +Predicate, +Options
            http_delete_handler/1,      % +Path
            http_request_expansion/2,   % :Goal, +Rank
            http_reply_file/3,          % +File, +Options, +Request
            http_redirect/3,            % +How, +Path, +Request
            http_404/2,                 % +Options, +Request
            http_switch_protocol/2,     % :Goal, +Options
            http_current_handler/2,     % ?Path, ?Pred
            http_current_handler/3,     % ?Path, ?Pred, -Options
            http_location_by_id/2,      % +ID, -Location
            http_link_to_id/3,          % +ID, +Parameters, -HREF
            http_reload_with_parameters/3, % +Request, +Parameters, -HRE
            % from http_wrapper
            http_current_request/1,     % -Request
            http_peer/2,
            % from http_parameters
            http_parameters/2,          % +Request, -Params
            http_parameters/3,
            % from html_write
            reply_html_page/2,          % :Head, :Body
            html//1,                    % :Content
            % Extension support
            (html_meta)/1,              % +Spec
            op(1150, fx, html_meta),
            % from http_json
            reply_json_dict/1,          % +JSON
            reply_json_dict/2,          % +JSON, Options
            http_read_json_dict/2,      % +Request, -Dict
            http_read_json_dict/3,      % +Request, -Dict, +Options
            is_json_content_type/1
          ]).