meta & kernel
This commit is contained in:
parent
aaadd51309
commit
1cafba0529
22
C/absmi.c
22
C/absmi.c
@ -917,6 +917,7 @@ static int interrupt_dexecute(USES_REGS1) {
|
|||||||
static void undef_goal(USES_REGS1) {
|
static void undef_goal(USES_REGS1) {
|
||||||
PredEntry *pe = PredFromDefCode(P);
|
PredEntry *pe = PredFromDefCode(P);
|
||||||
CELL *b;
|
CELL *b;
|
||||||
|
CELL *b0;
|
||||||
|
|
||||||
BEGD(d0);
|
BEGD(d0);
|
||||||
/* avoid trouble with undefined dynamic procedures */
|
/* avoid trouble with undefined dynamic procedures */
|
||||||
@ -955,14 +956,23 @@ static void undef_goal(USES_REGS1) {
|
|||||||
PP = NULL;
|
PP = NULL;
|
||||||
#endif
|
#endif
|
||||||
d0 = pe->ArityOfPE;
|
d0 = pe->ArityOfPE;
|
||||||
|
if (pe->ModuleOfPred == PROLOG_MODULE) {
|
||||||
|
if (CurrentModule == PROLOG_MODULE)
|
||||||
|
HR[0] = MkAtomTerm(Yap_LookupAtom("prolog"));
|
||||||
|
else
|
||||||
|
HR[0] = CurrentModule;
|
||||||
|
} else {
|
||||||
HR[0] = Yap_Module_Name(pe);
|
HR[0] = Yap_Module_Name(pe);
|
||||||
b = HR;
|
}
|
||||||
|
b = b0 = HR;
|
||||||
HR += 2;
|
HR += 2;
|
||||||
if (d0 == 0) {
|
if (d0 == 0) {
|
||||||
b[1] = MkAtomTerm((Atom)(pe->FunctorOfPred));
|
b[1] = MkAtomTerm((Atom)(pe->FunctorOfPred));
|
||||||
} else {
|
} else {
|
||||||
b[1] = AbsAppl(HR);
|
b[1] = AbsAppl(b+2);
|
||||||
*HR++ = (CELL)pe->FunctorOfPred;
|
*HR++ = (CELL)pe->FunctorOfPred;
|
||||||
|
b += 3;
|
||||||
|
HR += d0;
|
||||||
BEGP(pt1);
|
BEGP(pt1);
|
||||||
pt1 = XREGS + 1;
|
pt1 = XREGS + 1;
|
||||||
for (; d0 > 0; --d0) {
|
for (; d0 > 0; --d0) {
|
||||||
@ -973,13 +983,13 @@ static void undef_goal(USES_REGS1) {
|
|||||||
deref_head(d1, undef_unk);
|
deref_head(d1, undef_unk);
|
||||||
undef_nonvar:
|
undef_nonvar:
|
||||||
/* just copy it to the heap */
|
/* just copy it to the heap */
|
||||||
*HR++ = d1;
|
*b++ = d1;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
derefa_body(d1, pt0, undef_unk, undef_nonvar);
|
derefa_body(d1, pt0, undef_unk, undef_nonvar);
|
||||||
if (pt0 <= HR) {
|
if (pt0 <= HR) {
|
||||||
/* variable is safe */
|
/* variable is safe */
|
||||||
*HR++ = (CELL)pt0;
|
*b++ = (CELL)pt0;
|
||||||
} else {
|
} else {
|
||||||
/* bind it, in case it is a local variable */
|
/* bind it, in case it is a local variable */
|
||||||
d1 = Unsigned(HR);
|
d1 = Unsigned(HR);
|
||||||
@ -993,8 +1003,8 @@ static void undef_goal(USES_REGS1) {
|
|||||||
ENDP(pt1);
|
ENDP(pt1);
|
||||||
}
|
}
|
||||||
ENDD(d0);
|
ENDD(d0);
|
||||||
ARG2 = Yap_getUnknownModule(Yap_GetModuleEntry(b[0]));
|
ARG1 = AbsPair(b0);
|
||||||
ARG1 = AbsPair(b);
|
ARG2 = Yap_getUnknownModule(Yap_GetModuleEntry(b0[0]));
|
||||||
#ifdef LOW_LEVEL_TRACER
|
#ifdef LOW_LEVEL_TRACER
|
||||||
if (Yap_do_low_level_trace)
|
if (Yap_do_low_level_trace)
|
||||||
low_level_trace(enter_pred, UndefCode, XREGS + 1);
|
low_level_trace(enter_pred, UndefCode, XREGS + 1);
|
||||||
|
34
C/exec.c
34
C/exec.c
@ -269,7 +269,7 @@ static bool CommaCall(Term t, Term mod) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static bool do_execute(Term t, Term mod USES_REGS) {
|
inline static bool do_execute(Term t, Term mod USES_REGS) {
|
||||||
Term t0 = t;
|
Term t0 = t, mod0 = mod;
|
||||||
t = Yap_YapStripModule(t, &mod);
|
t = Yap_YapStripModule(t, &mod);
|
||||||
/* first do predicate expansion, even before you process signals.
|
/* first do predicate expansion, even before you process signals.
|
||||||
This way you don't get to spy goal_expansion(). */
|
This way you don't get to spy goal_expansion(). */
|
||||||
@ -278,7 +278,7 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
|
|||||||
return EnterCreepMode(t, mod PASS_REGS);
|
return EnterCreepMode(t, mod PASS_REGS);
|
||||||
}
|
}
|
||||||
if (IsVarTerm(t) || IsVarTerm(mod)) {
|
if (IsVarTerm(t) || IsVarTerm(mod)) {
|
||||||
return CallError(INSTANTIATION_ERROR, t0, mod PASS_REGS);
|
return CallError(INSTANTIATION_ERROR, t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
if (IsApplTerm(t)) {
|
if (IsApplTerm(t)) {
|
||||||
register Functor f = FunctorOfTerm(t);
|
register Functor f = FunctorOfTerm(t);
|
||||||
@ -290,9 +290,9 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
|
|||||||
if (f == FunctorComma && false) {
|
if (f == FunctorComma && false) {
|
||||||
Term t2 = ArgOfTerm(2, t);
|
Term t2 = ArgOfTerm(2, t);
|
||||||
if (IsVarTerm(t2))
|
if (IsVarTerm(t2))
|
||||||
return CallMetaCall(t, mod PASS_REGS);
|
return CallMetaCall(t0, mod0 PASS_REGS);
|
||||||
if (1 || !CommaCall(t2, mod))
|
if (1 || !CommaCall(t2, mod))
|
||||||
return CallMetaCall(t, mod PASS_REGS);
|
return CallMetaCall(t0, mod0 PASS_REGS);
|
||||||
Term t1 = ArgOfTerm(1, t);
|
Term t1 = ArgOfTerm(1, t);
|
||||||
|
|
||||||
t = t1;
|
t = t1;
|
||||||
@ -301,11 +301,11 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
|
|||||||
return do_execute(t, mod);
|
return do_execute(t, mod);
|
||||||
}
|
}
|
||||||
} else if (IsExtensionFunctor(f)) {
|
} else if (IsExtensionFunctor(f)) {
|
||||||
return CallError(TYPE_ERROR_CALLABLE, t, mod PASS_REGS);
|
return CallError(TYPE_ERROR_CALLABLE, t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
arity = ArityOfFunctor(f);
|
arity = ArityOfFunctor(f);
|
||||||
if (arity > MaxTemps) {
|
if (arity > MaxTemps) {
|
||||||
return CallError(TYPE_ERROR_CALLABLE, t, mod PASS_REGS);
|
return CallError(TYPE_ERROR_CALLABLE, t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
pen = RepPredProp(PredPropByFunc(f, mod));
|
pen = RepPredProp(PredPropByFunc(f, mod));
|
||||||
/* You thought we would be over by now */
|
/* You thought we would be over by now */
|
||||||
@ -315,7 +315,7 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
|
|||||||
otherwise I would dereference the argument and
|
otherwise I would dereference the argument and
|
||||||
might skip a svar */
|
might skip a svar */
|
||||||
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
|
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
|
||||||
return CallMetaCall(t, mod PASS_REGS);
|
return CallMetaCall(t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
pt = RepAppl(t) + 1;
|
pt = RepAppl(t) + 1;
|
||||||
for (i = 1; i <= arity; i++) {
|
for (i = 1; i <= arity; i++) {
|
||||||
@ -346,7 +346,7 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
|
|||||||
pe = RepPredProp(PredPropByAtom(a, mod));
|
pe = RepPredProp(PredPropByAtom(a, mod));
|
||||||
return (CallPredicate(pe, B, pe->CodeOfPred PASS_REGS));
|
return (CallPredicate(pe, B, pe->CodeOfPred PASS_REGS));
|
||||||
}
|
}
|
||||||
return CallMetaCall(t, mod PASS_REGS);
|
return CallMetaCall(t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Term copy_execn_to_heap(Functor f, CELL *pt, unsigned int n,
|
static Term copy_execn_to_heap(Functor f, CELL *pt, unsigned int n,
|
||||||
@ -390,17 +390,17 @@ inline static bool do_execute_n(Term t, Term mod, unsigned int n USES_REGS) {
|
|||||||
PredEntry *pen;
|
PredEntry *pen;
|
||||||
unsigned int i, arity;
|
unsigned int i, arity;
|
||||||
int j = -n;
|
int j = -n;
|
||||||
Term t0 = t;
|
Term t0 = t, mod0 = mod;
|
||||||
|
|
||||||
restart_exec:
|
restart_exec:
|
||||||
if (IsVarTerm(t)) {
|
if (IsVarTerm(t)) {
|
||||||
return CallError(INSTANTIATION_ERROR, t0, mod PASS_REGS);
|
return CallError(INSTANTIATION_ERROR, t0, mod0 PASS_REGS);
|
||||||
} else if (IsAtomTerm(t)) {
|
} else if (IsAtomTerm(t)) {
|
||||||
arity = n;
|
arity = n;
|
||||||
Name = AtomOfTerm(t);
|
Name = AtomOfTerm(t);
|
||||||
pt = NULL;
|
pt = NULL;
|
||||||
} else if (IsIntTerm(t)) {
|
} else if (IsIntTerm(t)) {
|
||||||
return CallError(TYPE_ERROR_CALLABLE, t, mod PASS_REGS);
|
return CallError(TYPE_ERROR_CALLABLE, t, mod0 PASS_REGS);
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
arity = n + 2;
|
arity = n + 2;
|
||||||
pt = RepPair(t);
|
pt = RepPair(t);
|
||||||
@ -415,9 +415,9 @@ restart_exec:
|
|||||||
goto restart_exec;
|
goto restart_exec;
|
||||||
} else {
|
} else {
|
||||||
if (IsVarTerm(tmod)) {
|
if (IsVarTerm(tmod)) {
|
||||||
return CallError(INSTANTIATION_ERROR, t0, tmod PASS_REGS);
|
return CallError(INSTANTIATION_ERROR, t0, mod0 PASS_REGS);
|
||||||
} else {
|
} else {
|
||||||
return CallError(TYPE_ERROR_ATOM, t0, tmod PASS_REGS);
|
return CallError(TYPE_ERROR_ATOM, t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -427,7 +427,7 @@ restart_exec:
|
|||||||
}
|
}
|
||||||
f = Yap_MkFunctor(Name, arity);
|
f = Yap_MkFunctor(Name, arity);
|
||||||
if (IsExtensionFunctor(f)) {
|
if (IsExtensionFunctor(f)) {
|
||||||
return CallError(TYPE_ERROR_CALLABLE, t, mod PASS_REGS);
|
return CallError(TYPE_ERROR_CALLABLE, t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
if (Yap_has_a_signal() && !LOCAL_InterruptsDisabled) {
|
if (Yap_has_a_signal() && !LOCAL_InterruptsDisabled) {
|
||||||
return EnterCreepMode(
|
return EnterCreepMode(
|
||||||
@ -435,14 +435,14 @@ restart_exec:
|
|||||||
mod PASS_REGS);
|
mod PASS_REGS);
|
||||||
}
|
}
|
||||||
if (arity > MaxTemps) {
|
if (arity > MaxTemps) {
|
||||||
return CallError(TYPE_ERROR_CALLABLE, t, mod PASS_REGS);
|
return CallError(TYPE_ERROR_CALLABLE, t0, mod0 PASS_REGS);
|
||||||
}
|
}
|
||||||
pen = RepPredProp(PredPropByFunc(f, mod));
|
pen = RepPredProp(PredPropByFunc(f, mod));
|
||||||
/* You thought we would be over by now */
|
/* You thought we would be over by now */
|
||||||
/* but no meta calls require special preprocessing */
|
/* but no meta calls require special preprocessing */
|
||||||
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
|
if (pen->PredFlags & (MetaPredFlag | UndefPredFlag)) {
|
||||||
Term t = copy_execn_to_heap(f, pt, n, arity, mod PASS_REGS);
|
// Term t = copy_execn_to_heap(f, pt, n, arity, mod PASS_REGS);
|
||||||
return (CallMetaCall(t, mod PASS_REGS));
|
return (CallMetaCall(t0, mod0 PASS_REGS));
|
||||||
}
|
}
|
||||||
/* now let us do what we wanted to do from the beginning !! */
|
/* now let us do what we wanted to do from the beginning !! */
|
||||||
/* I cannot use the standard macro here because
|
/* I cannot use the standard macro here because
|
||||||
|
1160
misc/editors/yap.js
1160
misc/editors/yap.js
File diff suppressed because it is too large
Load Diff
11
os/charsio.c
11
os/charsio.c
@ -77,7 +77,6 @@ static Int put_code(USES_REGS1);
|
|||||||
static Int put_byte(USES_REGS1);
|
static Int put_byte(USES_REGS1);
|
||||||
static Int skip(USES_REGS1);
|
static Int skip(USES_REGS1);
|
||||||
static Int flush_output(USES_REGS1);
|
static Int flush_output(USES_REGS1);
|
||||||
static Int flush_all_streams(USES_REGS1);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CharOfAtom: convert an atom into a single character.
|
* CharOfAtom: convert an atom into a single character.
|
||||||
@ -167,7 +166,6 @@ int Yap_peekWide(int sno) {
|
|||||||
Int line = s->linecount;
|
Int line = s->linecount;
|
||||||
Int lpos = s->linepos;
|
Int lpos = s->linepos;
|
||||||
int ch = s->stream_wgetc(sno);
|
int ch = s->stream_wgetc(sno);
|
||||||
fprintf(stderr, "%d=%c\n", fileno(s->file), ch);
|
|
||||||
if (ch == EOF) {
|
if (ch == EOF) {
|
||||||
if (s->file)
|
if (s->file)
|
||||||
clearerr(s->file);
|
clearerr(s->file);
|
||||||
@ -183,7 +181,7 @@ int Yap_peekWide(int sno) {
|
|||||||
s->linecount = line;
|
s->linecount = line;
|
||||||
s->linepos = lpos;
|
s->linepos = lpos;
|
||||||
s->stream_wgetc = Yap_popChar;
|
s->stream_wgetc = Yap_popChar;
|
||||||
s->stream_getc = NU;
|
s->stream_getc = NULL;
|
||||||
s->stream_peek= NULL;
|
s->stream_peek= NULL;
|
||||||
s->stream_wpeek= NULL;
|
s->stream_wpeek= NULL;
|
||||||
s->stream_getc = Yap_popChar;
|
s->stream_getc = Yap_popChar;
|
||||||
@ -214,7 +212,7 @@ int Yap_peekChar(int sno) {
|
|||||||
s->linecount = line;
|
s->linecount = line;
|
||||||
s->linepos = lpos;
|
s->linepos = lpos;
|
||||||
s->stream_getc = Yap_popChar;
|
s->stream_getc = Yap_popChar;
|
||||||
s->stream_wgetc = NU;
|
s->stream_wgetc = NULL;
|
||||||
s->stream_peek= NULL;
|
s->stream_peek= NULL;
|
||||||
s->stream_wpeek= NULL;
|
s->stream_wpeek= NULL;
|
||||||
//Yap_SetCurInpPos(sno, pos);
|
//Yap_SetCurInpPos(sno, pos);
|
||||||
@ -262,7 +260,10 @@ static Int at_end_of_stream(USES_REGS1) { /* at_end_of_stream */
|
|||||||
out = (Yap_peek(sno) < 0);
|
out = (Yap_peek(sno) < 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UNLOCK(GLOBAL_Stream[sno].streaml
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
/** @pred at_end_of_stream is iso
|
/** @pred at_end_of_stream is iso
|
||||||
|
|
||||||
|
|
||||||
|
10
os/iopreds.c
10
os/iopreds.c
@ -350,21 +350,19 @@ void Yap_DefaultStreamOps(StreamDesc *st) {
|
|||||||
st->stream_getc = Yap_popChar;
|
st->stream_getc = Yap_popChar;
|
||||||
st->stream_wgetc = Yap_popChar;
|
st->stream_wgetc = Yap_popChar;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if (st->file) {
|
|
||||||
if (st->status & Readline_Stream_f) {
|
if (st->status & Readline_Stream_f) {
|
||||||
st->stream_peek = Yap_ReadlinePeekChar;
|
st->stream_peek = Yap_ReadlinePeekChar;
|
||||||
st->stream_wpeek = Yap_ReadlinePeekChar;
|
st->stream_wpeek = Yap_ReadlinePeekChar;
|
||||||
} else {
|
}
|
||||||
|
/* else {
|
||||||
st->stream_peek = Yap_peekWithGetc;
|
st->stream_peek = Yap_peekWithGetc;
|
||||||
st->stream_wpeek = Yap_peekWideWithGetwc;
|
st->stream_wpeek = Yap_peekWideWithGetwc;
|
||||||
}
|
}
|
||||||
} else if (st->status & Seekable_Stream_f) {
|
} else if (st->status & Seekable_Stream_f) {
|
||||||
st->stream_peek = Yap_peekWithSeek;
|
st->stream_peek = Yap_peekWithSeek;
|
||||||
st->stream_wpeek = Yap_peekWideWithSeek;
|
st->stream_wpeek = Yap_peekWideWithSeek;
|
||||||
} else
|
} */
|
||||||
*/
|
else {
|
||||||
{
|
|
||||||
st->stream_peek = Yap_peekChar;
|
st->stream_peek = Yap_peekChar;
|
||||||
st->stream_wpeek = Yap_peekWide;
|
st->stream_wpeek = Yap_peekWide;
|
||||||
}
|
}
|
||||||
|
@ -337,6 +337,7 @@ static Term syntax_error(TokEntry *errtok, int sno, Term cmod, Int newpos) {
|
|||||||
else {
|
else {
|
||||||
tm = MkStringTerm("syntax error");
|
tm = MkStringTerm("syntax error");
|
||||||
}
|
}
|
||||||
|
if (GLOBAL_Stream[sno].status & Seekable_Stream_f) {
|
||||||
if (errpos && newpos >= 0) {
|
if (errpos && newpos >= 0) {
|
||||||
char o[128 + 1];
|
char o[128 + 1];
|
||||||
diff = errpos - startpos;
|
diff = errpos - startpos;
|
||||||
@ -359,6 +360,7 @@ static Term syntax_error(TokEntry *errtok, int sno, Term cmod, Int newpos) {
|
|||||||
#endif
|
#endif
|
||||||
o[diff] = '\0';
|
o[diff] = '\0';
|
||||||
tf[3] = MkStringTerm(o);
|
tf[3] = MkStringTerm(o);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
while (tok) {
|
while (tok) {
|
||||||
|
|
||||||
|
@ -1,42 +1,18 @@
|
|||||||
|
|
||||||
;(function(window_CodeMirror){
|
define([
|
||||||
"use strict";
|
"/kernelspecs/yap_kernel/prolog.js"],function(CodeMirror){
|
||||||
|
|
||||||
// the `require` namespace for codemirror
|
var onload = function(){
|
||||||
CM_PATH = "components/codemirror/";
|
console.log("I am being loaded");
|
||||||
|
var cell = Jupyter.notebook.get_selected_cell();
|
||||||
define(
|
var cm = cell.config;
|
||||||
[
|
var patch = {
|
||||||
"underscore",
|
CodeCell:{
|
||||||
"jquery",
|
cm_config:{mode: "prolog"} // only change here.
|
||||||
CM_PATH + "lib/codemirror",
|
}
|
||||||
"base/js/namespace",
|
};
|
||||||
// silent upgrades
|
config.update(patch);
|
||||||
"./jshint.js",
|
return {onload:onload};
|
||||||
CM_PATH + "addon/lint/javascript-lint",
|
|
||||||
CM_PATH + "addon/hint/javascript-hint",
|
|
||||||
CM_PATH + "addon/lint/lint",
|
|
||||||
CM_PATH + "addon/hint/show-hint",
|
|
||||||
"./prolog.js"
|
|
||||||
],
|
|
||||||
function(_, $, CodeMirror, Jupyter){
|
|
||||||
|
|
||||||
// the main function
|
|
||||||
cm_tweak_js = function(cell){
|
|
||||||
var editor = cell.code_mirror,
|
|
||||||
opts = {},
|
|
||||||
meta = ensure_ns(cell),
|
|
||||||
keys = editor.getOption("extraKeys") || {},
|
|
||||||
mode = editor.getMode();
|
|
||||||
|
|
||||||
// only update editors we care about, reset ones we might have messed
|
|
||||||
if(!editor){
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
editor.setOption("mode", "x-text/prolog");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
} // the `define` callback
|
|
||||||
); // the `define`
|
|
||||||
).call(this, window.CodeMirror);
|
|
||||||
|
@ -524,7 +524,6 @@ class YAPRun:
|
|||||||
return self.errors
|
return self.errors
|
||||||
|
|
||||||
def jupyter_query(self, s):
|
def jupyter_query(self, s):
|
||||||
import pdb; pdb.set_trace()
|
|
||||||
#
|
#
|
||||||
# construct a self.query from a one-line string
|
# construct a self.query from a one-line string
|
||||||
# self.q is opaque to Python
|
# self.q is opaque to Python
|
||||||
|
@ -213,13 +213,12 @@ print_message(L,E) :-
|
|||||||
).
|
).
|
||||||
|
|
||||||
:- c_compile('arith.yap').
|
:- c_compile('arith.yap').
|
||||||
:- c_compile('builtins.yap').
|
|
||||||
%:- stop_low_level_trace.
|
%:- stop_low_level_trace.
|
||||||
|
|
||||||
:- '$all_current_modules'(M), yap_flag(M:unknown, error) ; true.
|
|
||||||
|
|
||||||
:- '$init_prolog'.
|
:- '$init_prolog'.
|
||||||
|
|
||||||
|
:- '$all_current_modules'(M), yap_flag(M:unknown, error) ; true.
|
||||||
|
|
||||||
:- compile_expressions.
|
:- compile_expressions.
|
||||||
|
|
||||||
|
|
||||||
@ -230,6 +229,7 @@ print_message(L,E) :-
|
|||||||
:- c_compile('preddecls.yap').
|
:- c_compile('preddecls.yap').
|
||||||
:- c_compile('preddyns.yap').
|
:- c_compile('preddyns.yap').
|
||||||
:- c_compile('meta.yap').
|
:- c_compile('meta.yap').
|
||||||
|
:- c_compile('builtins.yap').
|
||||||
:- c_compile('newmod.yap').
|
:- c_compile('newmod.yap').
|
||||||
|
|
||||||
:- c_compile('atoms.yap').
|
:- c_compile('atoms.yap').
|
||||||
|
@ -498,7 +498,6 @@ expand_goal(Input, Output) :-
|
|||||||
'$yap_strip_module'(M:GF0, MF, GF).
|
'$yap_strip_module'(M:GF0, MF, GF).
|
||||||
|
|
||||||
:- '$install_meta_predicate'((0,0),prolog,(','),2).
|
:- '$install_meta_predicate'((0,0),prolog,(','),2).
|
||||||
:- '$install_meta_predicate'((0),prolog,(','),2).
|
|
||||||
|
|
||||||
meta_predicate(P) :-
|
meta_predicate(P) :-
|
||||||
source_module(SM),
|
source_module(SM),
|
||||||
|
@ -460,7 +460,8 @@ op(Prio,Assoc,Mod:Name),
|
|||||||
; prolog_load_context(file, File) ->
|
; prolog_load_context(file, File) ->
|
||||||
recorda('$module','$module'(File,Mod,SourceF,[op(Prio,Assoc,Name)],Line),_)
|
recorda('$module','$module'(File,Mod,SourceF,[op(Prio,Assoc,Name)],Line),_)
|
||||||
; recorda('$module','$module'(user_input,Mod,user_input,[op(Prio,Assoc,Name)],1),_)
|
; recorda('$module','$module'(user_input,Mod,user_input,[op(Prio,Assoc,Name)],1),_)
|
||||||
).export_resource(Resource) :-
|
).
|
||||||
|
export_resource(Resource) :-
|
||||||
'$do_error'(type_error(predicate_indicator,Resource),export(Resource)).
|
'$do_error'(type_error(predicate_indicator,Resource),export(Resource)).
|
||||||
|
|
||||||
export_list(Module, List) :-
|
export_list(Module, List) :-
|
||||||
|
Reference in New Issue
Block a user