<< Back to previous view

[LOGIC-118] prep does not make lvar of ?x if ?x is in a vector Created: 11/Mar/13  Updated: 24/Nov/14  Resolved: 24/Nov/14

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

Type: Defect Priority: Major
Reporter: Jonas Enlund Assignee: David Nolen
Resolution: Completed Votes: 1
Labels: None

Attachments: File LOGIC-118.diff     File LOGIC-118-version2.diff    


In latest master:

user=> (use 'clojure.core.logic.unifier)
user=> (prep '([?x]))
([<lvar:?x>]) ;; ok. ?x turned into an lvar
user=> (prep '([?x] . ?xs))
([?x] . <lvar:?xs>) ;; fail. ?x is not an lvar

The last expression should return ([<lvar:?x>] . <lvar:?xs>)

Comment by Jonas Enlund [ 12/Mar/13 12:11 AM ]

patch LOGIC-118.diff fixes this issue. I'm not sure if it does so correctly.

Comment by David Nolen [ 17/Mar/13 11:42 AM ]

It's seem to me that this should be corrected in prep*? It looks like the issue is that prep* only handles seqs and not collections in general.

Comment by Jennifer Smith [ 09/Nov/14 11:29 PM ]

This should address the issue merely by swapping out (seq? ...) with (coll? ...) - passes the supplied test case.

Comment by David Nolen [ 24/Nov/14 1:24 PM ]

fixed https://github.com/clojure/core.logic/commit/dba7c697ca45a7fee7595cd18d057c420261d498

Generated at Wed Jan 17 12:33:42 CST 2018 using JIRA 4.4#649-r158309.