core.logic

nom/hash and variable noms

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

It would be nice if nom/hash handled variable noms:

(run* [q]
  (nom/fresh [x]
    (fresh [y]
      (nomo y)
      (nom/hash y x)
      (== x y)))

This returns '(_0) instead of (). Fortunately, a work-around is to use != instead of nom/hash when comparing two noms. However, it's bad that this silently does something unexpected.

Activity

Hide
Nada Amin added a comment -

logic-101.diff has workaround + test.

Show
Nada Amin added a comment - logic-101.diff has workaround + test.
Nada Amin made changes -
Field Original Value New Value
Attachment logic-101.diff [ 11795 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: