@@ -37,23 +37,23 @@ external symbol (;) prop -> prop -> prop.
3737
3838(_ ; B) :- B.
3939
40- external symbol (:-) : fprop -> fprop -> fprop = "core".
40+ external symbol (:-) : (func) -> (func) -> (func) = "core".
4141
42- external symbol (:-) : fprop -> list prop -> fprop = "core".
42+ external symbol (:-) : (func) -> list prop -> (func) = "core".
4343
44- external symbol (,) : variadic fprop fprop .
44+ external symbol (,) : variadic (func) (func) .
4545
4646external symbol uvar : A = "core".
4747
4848external symbol (as) : A -> A -> A = "core".
4949
50- external symbol (=>) : prop -> fprop -> fprop = "core".
50+ external symbol (=>) : prop -> (func) -> (func) = "core".
5151
52- external symbol (=>) : list prop -> fprop -> fprop = "core".
52+ external symbol (=>) : list prop -> (func) -> (func) = "core".
5353
54- external symbol (==>) : prop -> fprop -> fprop .
54+ external symbol (==>) : prop -> (func) -> (func) .
5555
56- external symbol (==>) : list prop -> fprop -> fprop .
56+ external symbol (==>) : list prop -> (func) -> (func) .
5757
5858% -- Control --
5959
@@ -73,7 +73,7 @@ external func declare_constraint (func) -> any .. .
7373external func print_constraints.
7474
7575% [halt ...] halts the program and print the terms
76- external type halt variadic any fprop .
76+ external type halt variadic any (func) .
7777
7878func stop.
7979
@@ -294,10 +294,10 @@ external symbol error : string -> diagnostic = "1". % Failure
294294% == Elpi builtins =====================================
295295
296296% [dprint ...] prints raw terms (debugging)
297- external type dprint variadic any fprop .
297+ external type dprint variadic any (func) .
298298
299299% [print ...] prints terms
300- external type print variadic any fprop .
300+ external type print variadic any (func) .
301301
302302% Deprecated, use trace.counter
303303func counter string -> int.
@@ -341,7 +341,7 @@ rex_split Rx S L :- rex.split Rx S L.
341341
342342% [var V ...] checks if the term V is a variable. When used with tree
343343% arguments it relates an applied variable with its head and argument list.
344- external type var any -> variadic any fprop .
344+ external func var -> any, any.. .
345345
346346
347347% [prune V L] V is pruned to L (V is unified with a variable that only sees
@@ -374,11 +374,11 @@ external func cmp_term any, any -> cmp.
374374
375375% [name T ...] checks if T is a eigenvariable. When used with tree arguments
376376% it relates an applied name with its head and argument list.
377- external type name any -> variadic any fprop .
377+ external func name -> any, any.. .
378378
379379% [constant T ...] checks if T is a (global) constant. When used with tree
380380% arguments it relates an applied constant with its head and argument list.
381- external type constant any -> variadic any fprop .
381+ external func constant -> any, any.. .
382382
383383external func names % generates the list of eigenvariable
384384 -> list any. % list of eigenvariables in order of age (young first)
@@ -428,12 +428,12 @@ external func open_safe safe -> list A.
428428
429429% [if C T E] picks the first success of C then runs T (never E).
430430% if C has no success it runs E.
431- func if prop, fprop, fprop .
431+ func if prop, (func), (func) .
432432if B T _ :- B, !, T.
433433if _ _ E :- E.
434434
435435% [if2 C1 B1 C2 B2 E] like if but with 2 then branches (and one else branch).
436- func if2 prop, fprop , prop, fprop, fprop .
436+ func if2 prop, (func) , prop, (func), (func) .
437437if2 G1 P1 _ _ _ :- G1, !, P1.
438438if2 _ _ G2 P2 _ :- G2, !, P2.
439439if2 _ _ _ _ E :- !, E.
@@ -734,7 +734,7 @@ intersperse Sep [X|XS] [X,Sep|YS] :- intersperse Sep XS YS.
734734func flip (func A, B), B, A.
735735flip P X Y :- P Y X.
736736
737- func time fprop -> float.
737+ func time (func) -> float.
738738time P T :- gettimeofday Before, P, gettimeofday After, T is After - Before.
739739
740740func do! list prop.
@@ -929,7 +929,7 @@ external func std.string.set.cardinal std.string.set -> int.
929929
930930% [std.string.set.filter M F M1] Filter M w.r.t. the predicate F
931931external func std.string.set.filter std.string.set,
932- (string -> prop ) -> std.string.set.
932+ (string -> (func) ) -> std.string.set.
933933
934934% [std.string.set.map M F M1] Map M w.r.t. the predicate F
935935external func std.string.set.map std.string.set,
@@ -942,7 +942,7 @@ external func std.string.set.fold std.string.set, A,
942942% [std.string.set.partition M F M1 M2] Partitions M w.r.t. the predicate F,
943943% M1 is where F holds
944944external func std.string.set.partition std.string.set,
945- (string -> prop ) -> std.string.set,
945+ (string -> (func) ) -> std.string.set,
946946 std.string.set.
947947
948948kind std.int.set type.
@@ -991,7 +991,7 @@ external func std.int.set.cardinal std.int.set -> int.
991991
992992% [std.int.set.filter M F M1] Filter M w.r.t. the predicate F
993993external func std.int.set.filter std.int.set,
994- (int -> prop ) -> std.int.set.
994+ (int -> (func) ) -> std.int.set.
995995
996996% [std.int.set.map M F M1] Map M w.r.t. the predicate F
997997external func std.int.set.map std.int.set,
@@ -1004,7 +1004,7 @@ external func std.int.set.fold std.int.set, A,
10041004% [std.int.set.partition M F M1 M2] Partitions M w.r.t. the predicate F, M1
10051005% is where F holds
10061006external func std.int.set.partition std.int.set,
1007- (int -> prop ) -> std.int.set,
1007+ (int -> (func) ) -> std.int.set,
10081008 std.int.set.
10091009
10101010kind std.loc.set type.
@@ -1053,7 +1053,7 @@ external func std.loc.set.cardinal std.loc.set -> int.
10531053
10541054% [std.loc.set.filter M F M1] Filter M w.r.t. the predicate F
10551055external func std.loc.set.filter std.loc.set,
1056- (loc -> prop ) -> std.loc.set.
1056+ (loc -> (func) ) -> std.loc.set.
10571057
10581058% [std.loc.set.map M F M1] Map M w.r.t. the predicate F
10591059external func std.loc.set.map std.loc.set,
@@ -1066,7 +1066,7 @@ external func std.loc.set.fold std.loc.set, A,
10661066% [std.loc.set.partition M F M1 M2] Partitions M w.r.t. the predicate F, M1
10671067% is where F holds
10681068external func std.loc.set.partition std.loc.set,
1069- (loc -> prop ) -> std.loc.set,
1069+ (loc -> (func) ) -> std.loc.set,
10701070 std.loc.set.
10711071
10721072#line 1 "builtin_map.elpi"
0 commit comments