<< Back to previous view

[LOGIC-155] Dynamic variables are not seen inside a logic query Created: 28/Jan/14  Updated: 06/Jul/14  Resolved: 06/Jul/14

Status: Resolved
Project: core.logic
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Reinout Stevens Assignee: David Nolen
Resolution: Declined Votes: 0
Labels: binding, bug, dynamic

core.logic version 0.8.6
clojure version 1.5.1


core.logic does not work correctly with dynamic variables, as illustrated by the following code:

(def ^:dynamic dvar 'original)
(binding [*dvar* 'changed]
(logic/run* [?x] (logic/== ?x dvar)))

;;outputs (original), expected (changed)

To the best of my knowledge this used to work in older versions, although I do not know when the behaviour changed.

Comment by David Nolen [ 28/Jan/14 10:56 AM ]

This is because core.logic became lazy (been a year now? . There are now non lazy run variants or you can use doall yourself.

Generated at Tue Jan 23 14:24:38 CST 2018 using JIRA 4.4#649-r158309.