Skip to content

Commit 50e82d4

Browse files
committed
[elpi] minor improvements
1 parent 88bff84 commit 50e82d4

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/core/elpi_lambdapi.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ let lambdapi_builtin_declarations : BuiltIn.declaration list =
254254

255255
LPDoc "---- Elpi predicates ----";
256256

257-
] @ Elpi.Builtin.core_builtins @ Elpi.Builtin.elpi_builtins
257+
] @ Elpi.Builtin.core_builtins
258+
@ Elpi.Builtin.elpi_builtins
259+
@ Elpi.Builtin.elpi_nonlogical_builtins
258260

259261
let lambdapi_builtins =
260262
BuiltIn.declare ~file_name:"lambdap.elpi" lambdapi_builtin_declarations
@@ -296,7 +298,7 @@ fun ss file predicate arg ->
296298
| Execute.Success { Data.state; pp_ctx; constraints; _ } ->
297299
let _ = readback_assignments state in
298300
Console.out 1 "\nelpi: after: %a\n" Print.pp_term arg;
299-
Console.out 1 "elpi: constraints: %a\n"
301+
Console.out 1 "elpi: constraints:@ @[<v>%a@]\n"
300302
Pp.(constraints pp_ctx) constraints
301303
| Failure -> Console.fatal_no_pos "elpi: failure"
302304
| NoMoreSteps -> assert false

tests/OK/elpitest.elpi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ of (appl H A) Ta :-
2020
Ta = T A.
2121

2222
% suspension of typing on holes (type constraint)
23-
of (uvar as U) T :-
24-
declare_constraint (of U T) [U].
23+
of U T :- var U, declare_constraint (of U T) [U].
2524

2625
% uniqueness of typing
2726
constraint of {

tests/OK/elpitest.lp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ require open tests.OK.logic
22
require open tests.OK.bool
33
require open tests.OK.nat
44

5-
elpi "tests/OK/elpitest.elpi" "main"x y, P (eq ?T[x;y] x y) → P (eq ?T[x;y] y x))
5+
elpi "tests/OK/elpitest.elpi" "main"
6+
x y, P (eq ?T[x;y] x y) → P (eq ?T[x;y] y x))

0 commit comments

Comments
 (0)