core.logic

partial-map in ClojureScript does not correctly unify map members

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

Description

In the most recent changes to the core.logic's CLJS support (LOGIC-60), partial-map does not correctly unify the members within the map:

(m/run* [q]
  (m/fresh [pm x]
    (m/== pm (partial-map {:a x}))
    (m/== pm {:a 1 :b 2})
    (m/== x q))))
=> (1)

but,

(m/run* [q]
  (m/fresh [pm x]
    (m/== pm (partial-map {:a x}))
    (m/== pm {:a 1 :b 2})
    (m/== pm q))))
=> (#PMap{:a <lvar:x_3>})

The latter should unify to {:a 1}

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: