Skip to content

Commit

Permalink
Work on modules
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Nov 10, 2024
1 parent 43d4df1 commit 0a263d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 3 additions & 4 deletions library/lists.pl
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
include_(Xs1, P, Included1).

:- help(include(:callable,?list), [iso(false)]).
:- meta_predicate(include(1, ?, ?)).
:- meta_predicate(include(2, ?, ?)).

exclude(G, L, Included) :-
exclude_(L, G, Included).
Expand All @@ -446,7 +446,7 @@
exclude_(Xs1, P, Included1).

:- help(exclude(:callable,?list), [iso(false)]).
:- meta_predicate(exclude(1, ?, ?)).
:- meta_predicate(exclude(2, ?, ?)).

partition([X|L], Y, [X|L1], L2) :-
X @< Y, !,
Expand All @@ -455,8 +455,7 @@
partition(L, Y, L1, L2).
partition([], _, [], []).

:- help(partition(:callable,?list,?list), [iso(false)]).
:- meta_predicate(partition(1, ?, ?, ?)).
:- help(partition(?list,?term,?list,?list), [iso(false)]).

permutation(Xs, Ys) :-
'$skip_max_list'(Xlen, _, Xs, XTail),
Expand Down
6 changes: 6 additions & 0 deletions src/bif_predicates.c
Original file line number Diff line number Diff line change
Expand Up @@ -6252,6 +6252,12 @@ static void load_properties(module *m)
format_property(m, tmpbuf, sizeof(tmpbuf), "maplist", 6, "meta_predicate(maplist(5,?,?,?,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "maplist", 7, "meta_predicate(maplist(6,?,?,?,?,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "maplist", 8, "meta_predicate(maplist(7,?,?,?,?,?,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "include", 3, "meta_predicate(include(2,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "exclude", 3, "meta_predicate(exclude(2,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "foldl", 3, "meta_predicate(foldl(2,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "foldl", 4, "meta_predicate(foldl(3,?,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "foldl", 5, "meta_predicate(foldl(4,?,?,?,?))", false); SB_strcat(pr, tmpbuf);
format_property(m, tmpbuf, sizeof(tmpbuf), "foldl", 6, "meta_predicate(foldl(5,?,?,?,?,?))", false); SB_strcat(pr, tmpbuf);

#if USE_THREADS
format_property(m, tmpbuf, sizeof(tmpbuf), "thread_create", 3, "meta_predicate(thread_create(0,-,?))", false); SB_strcat(pr, tmpbuf);
Expand Down
3 changes: 0 additions & 3 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,6 @@ static bool directives(parser *p, cell *d)
//char tmpbuf[1024];
//snprintf(tmpbuf, sizeof(tmpbuf), "imported_from(%s)", p->m->name);
//push_property(save_m, C_STR(p, &tmp), tmp.arity, tmpbuf);
//push_property(save_m, C_STR(p, &tmp), tmp.arity, "static");
//push_property(save_m, C_STR(p, &tmp), tmp.arity, "visible");
//push_property(save_m, C_STR(p, &tmp), tmp.arity, "interpreted");
pr->is_public = true;
} else if (!strcmp(C_STR(p, head), "op") && (head->arity == 3)) {
do_op(p, head, true);
Expand Down

0 comments on commit 0a263d2

Please sign in to comment.