core.logic

prep does not properly recurse terms

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

(prep {:a {:b ?c} :d ?d})

?c is not walked according to Kevin Lynagh. This should also handle complex map keys.

  1. logic69.patch
    21/Nov/12 12:09 AM
    3 kB
    Kevin Lynagh
  2. logic69.patch
    21/Nov/12 12:16 AM
    3 kB
    Kevin Lynagh

Activity

Hide
Kevin Lynagh added a comment -
Show
Kevin Lynagh added a comment - Also available here: https://github.com/lynaghk/core.logic/tree/walk-recursive
Hide
Kevin Lynagh added a comment -

This patch adds prewalk recursion to IWalkTerm for map/record keys and values, seqs, and vectors.
Note that logic vars within map keys isn't going to unify in the current implementation, and probably isn't a sensible thing to do anyway. Prewalk of map keys is just so that people can use core.logic's walk implementation over clojure.walk to use the IUninitialized protocol.

Show
Kevin Lynagh added a comment - This patch adds prewalk recursion to IWalkTerm for map/record keys and values, seqs, and vectors. Note that logic vars within map keys isn't going to unify in the current implementation, and probably isn't a sensible thing to do anyway. Prewalk of map keys is just so that people can use core.logic's walk implementation over clojure.walk to use the IUninitialized protocol.
Hide
Kevin Lynagh added a comment -

(Patch updated to walk map keys. I couldn't figure out how to remove old patch in JIRA.)

Show
Kevin Lynagh added a comment - (Patch updated to walk map keys. I couldn't figure out how to remove old patch in JIRA.)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: