Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.logic by
As reported on the Clojure mailing list by Burt:

with "1.9.0-alpha10" and core.logic "0.8.10":

(ns lwb.nd.rules
  (:refer-clojure :exclude [==])
  (:require [clojure.core.logic :refer :all]))
=> nil

with "1.9.0-alpha12" and core.logic "0.8.10":

(ns lwb.nd.rules
  (:refer-clojure :exclude [==])
  (:require [clojure.core.logic :refer :all]))
CompilerException clojure.lang.ExceptionInfo: Call to clojure.core/fn did not conform to spec:
In: [0] val: clojure.core.logic/-inc fails spec: :clojure.core.specs/arg-list at: [:args :bs :arity-1 :args] predicate: vector?
In: [0] val: clojure.core.logic/-inc fails spec: :clojure.core.specs/args+body at: [:args :bs :arity-n] predicate: (cat :args :clojure.core.specs/arg-list :prepost (? map?) :body (* any?))
:clojure.spec/args  (clojure.core.logic/-inc [] (bind (this) g))
 #:clojure.spec{:problems ({:path [:args :bs :arity-1 :args], :pred vector?, :val clojure.core.logic/-inc, :via [:clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list], :in [0]} {:path [:args :bs :arity-n], :pred (cat :args :clojure.core.specs/arg-list :prepost (? map?) :body (* any?)), :val clojure.core.logic/-inc, :via [:clojure.core.specs/args+body :clojure.core.specs/args+body], :in [0]}), :args (clojure.core.logic/-inc [] (bind (this) g))}, compiling:(clojure/core/logic.clj:1130:5)

4 Answers

0 votes
by

Comment made by: steveminer@gmail.com

It looks like the problem is with the macro -inc. It should quote the internal fn name so that it stays an unqualified symbol during macro expansion.

0 votes
by

Comment made by: steveminer@gmail.com

Macro needs to protect internal name of fn during expansion.

0 votes
by

Comment made by: steveminer@gmail.com

The same fix was recently committed by puredanger.
https://github.com/clojure/core.logic/commit/29917372ef066c42ca362e3a94f68d620ddd1b56

0 votes
by
Reference: https://clojure.atlassian.net/browse/LOGIC-180 (reported by steveminer@gmail.com)
...