summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2014-12-17 16:53:01 +0100
committerAleš Smodiš <aless@guru.si>2015-08-11 14:26:00 +0200
commit4eb122ed69549e97bf316cf2aee932897cb7ac25 (patch)
treeb6de73a0fd44252f2d1c627f16bb425b51dc1e20
parente95aa102182957ccd35d0489dacd073bd76c3351 (diff)
Quote predicate name for abolish/1
-rw-r--r--prolog/engine.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/prolog/engine.py b/prolog/engine.py
index ea9b19a..8ad8bfa 100644
--- a/prolog/engine.py
+++ b/prolog/engine.py
@@ -284,13 +284,13 @@ class PrologEngine(object):
name = Term()
arity = Term()
self.call('functor/3', [term, name, arity])
- return '{}/{}'.format(name, arity)
+ return "'{}'/{}".format(name, arity)
fid = PL_open_foreign_frame()
clause = Term(clause)
functor = main_functor(clause)
# Check whether [clause] is a rule or a fact.
- if functor == ':-/2':
+ if functor == "':-'/2":
# [clause] is a rule, return the main functor for the head.
head = Term()
self.call('arg/3', [Term(1), clause, head])