<< Back to previous view

[LOGIC-142] Unified map values are returned as LVar rather than the unified value in ClojureScript Created: 29/Sep/13  Updated: 31/Dec/14

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

Type: Defect Priority: Major
Reporter: Darrick Wiebe Assignee: David Nolen
Resolution: Unresolved Votes: 0
Labels: None


Attachments: Text File 0001-logic-142-arraymap-not-correctly-walked.patch    


This works correctly in core.logic for clojure:

(run 1 [q]
     (fresh [v]
            (== v 1)
            (== {:x v} q)))

In ClojureScript, I get this though:

({:x <lvar:v_4>})

Comment by Norman Richards [ 31/Dec/14 2:06 PM ]

The clojurescript code did not implement -walk-term for PersistentArrayMap.

I've copied the PersistentHashMap implementation for PersistentArrayMap. Note: the current implementation (walk-term-map*) does not actually work for hash maps due to the use of -next and -first. Changing these to next and first would fix this for hash maps, but I'm not sure if this has any implications in clojurescript or not.

Comment by David Nolen [ 31/Dec/14 2:35 PM ]

Norman, do you mean -next, -first doesn't work for array maps?

Generated at Tue Jan 16 21:44:16 CST 2018 using JIRA 4.4#649-r158309.