]> Repositorios git - scryer-prolog.git/commitdiff
check that Module is an atom before calling Module:goal_expansion/2
authorMark Thom <[email protected]>
Mon, 1 Mar 2021 01:28:12 +0000 (18:28 -0700)
committerMark Thom <[email protected]>
Mon, 1 Mar 2021 01:28:12 +0000 (18:28 -0700)
src/loader.pl

index e5304812e9bededba9b71a3ff4ad6046a8169013..8a409ce26b1a16f1ef9febc64d148470b3e2e83b 100644 (file)
@@ -60,7 +60,8 @@ term_expansion_list([Term|Terms], ExpandedTermsHead, ExpandedTermsTail) :-
 
 
 goal_expansion(Goal, Module, ExpandedGoal) :-
-    (  catch('$call'(Module:goal_expansion(Goal, ExpandedGoal0)),
+    (  atom(Module),
+       catch('$call'(Module:goal_expansion(Goal, ExpandedGoal0)),
              E,
              '$call'(loader:'$print_message_and_fail'(E))) ->
        (  var(ExpandedGoal0) ->