functional-database.scm: bugfix in thunk conversion

parent d8706dc5
......@@ -134,9 +134,9 @@ PSSOURCES = \
language/prolog/modules/library/rbtrees.p \
language/prolog/modules/library/forward_chaining.pl \
language/prolog/modules/ex/att.pl \
language/prolog/modules/examples/cluster.pl
# language/prolog/modules/library/clpb.pl
# language/prolog/modules/library/clpfd.pl
language/prolog/modules/examples/cluster.pl \
language/prolog/modules/library/clpb.pl \
language/prolog/modules/library/clpfd.pl
# language/prolog/modules/library/apply_macros.pl
AM_MAKEINFOFLAGS=--force
......
......@@ -42,14 +42,8 @@
(#:boot (language prolog modules test2))
(#:boot (language prolog modules examples cluster))
(language prolog modules library clpb)
(language prolog modules library clpfd1)
(language prolog modules library clpfd2)
(language prolog modules library clpfd3)
(language prolog modules library clpfd4)
(language prolog modules library clpfd5)
(language prolog modules library clpfd6)
(language prolog modules library clpfd)
(#:boot (language prolog modules swi term_macro))))
(#:boot (language prolog modules swi term_macro))))
......
......@@ -33,12 +33,14 @@ doall(_ : _) :- !, fail.
doall((A :- B),[A :- B]) :- !, \+ (A =.. [(_ : _) | _]), \+ (A=(_ : _)).
doall(A,[A]) :- \+ A =..[(_ : _) | _], \+ A=(_ : _).
directives((:- "fast_compile"),[]) :-
do[((@ (guile) set!) (@@ (logic guile-log prolog base) *eval-only*) #t)].
:- dynamic(doif/0).
doif(1).
ifmacro((:- if(Code)),[]) :- !,
Code -> asserta(doif(1)) ; asserta(doif(0)).
......@@ -56,6 +58,7 @@ ifmacro(X,[Y]) :-
mname(X) :- module_name(N), X@@! = N.
attr_macro(X, Z) :-
(X = (XX :- Code) ; X = (XX --> Code)),!,
X = OP(_,_),
......@@ -111,6 +114,7 @@ attr_macro(X, Z) :-
).
:-dynamic(termexp/4).
term_macro(X,Z) :-
goal_expand(X,XX) -> term_macro0(XX,Z) ; term_macro0(X,Z).
......@@ -147,7 +151,7 @@ goal_macro0((F :- Z),Res) :- !,
(
F=..[U,X,Y],
U=="goal_expansion",
current_module(Name),
current_module(Name),
assertz(goalexp(Name,X,Y,Z)),fail
)
).
......@@ -207,6 +211,7 @@ all((H :- X)) :- !,
assertzf(H :- call(X)),
fail.
all((:- Head)) :- !,
Head =..[F|L],
(
......
......@@ -757,9 +757,9 @@ add/run * vlist *
(d (get-dyn e))
(ar (get-ar e))
(l (get-li e))
(a (if l a (p a)))
(f (if l f (p f)))
(c (if l c (p c)))
(a (if l (p a) a))
(f (if l (p f) f))
(c (if l (p c) c))
(data (vector t a f c g)))
(values
(vector (next-bitmap-tag t)
......
......@@ -522,4 +522,4 @@
(_
(type_error predicate_indicator X))))
(set! (@@ (logic guile-log prolog parser) assertz-source+) assertz-source)
(set! (@@ (logic guile-log prolog parser) assertz-source+) assertz-source+)
......@@ -1110,11 +1110,11 @@
(<define> (expand-0 line stx x)
(<var> (y m xx)
;(<pp> `(expand-0))
#;(<<match>> (#:mode -) (x)
(#((_ x _)) (<pp> x))
(_ <cc>))
;(<<match>> (#:mode -) (x)
; (#((_ x _)) (<pp> x))
; (_ <cc>))
(expand_term_0 x y)
(<pp> `(expand-0-y ,y))
;(<pp> `(expand-0-y ,(pk y)))
(<recur> lp ((y y) (r '()))
(<<match>> (#:mode - #:name expand) (y)
((x . l)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment