<< 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
Environment:

core.logic version 0.8.6
clojure version 1.5.1



 Description   

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.



 Comments   
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 Thu Oct 23 00:54:08 CDT 2014 using JIRA 4.4#649-r158309.