On Sat, Mar 23, 2013 at 7:32 AM, Hugo Duncan <duncan.h...@gmail.com> wrote:

> Ambrose Bonnaire-Sergeant <abonnaireserge...@gmail.com> writes:
>
> > Now that ClojureWest has finished, I'll gently bump this thread :)
> >
> > Thanks,
> > Ambrose
>
> Ambrose,
>
> I had a quick look at this.  I tried running with zi:test, and it
> complained about a missing dependency on tools.macro.  Adding that as a
> test scoped dependency and running again gives me:
>
>   [ERROR] InvocationTargetException:
> java.lang.StringIndexOutOfBoundsException: String index out of range: 1,
> compiling:(clojure/core/typed/test/mini_kanren.clj:575:3)
>
> The original error seems to have something to do with the core.contracts
> expansion.  Defining TopFilter and BotFilter with c.core/defrecord (and
> defining appropriate type predicate functions) seems to get further.


Cheers Hugo. You're right, it does get further with some defrecords, then
gets stuck at another defconstrainedrecord predicate.

This is the macroexpansion for a defconstrainedrecord predicate:

  (clojure.core/let [t__3815__auto__ (clojure.core/defrecord
                                       TopFilter
                                       [])]
    (clojure.core/defn TopFilter? [r__3816__auto__]
      (clojure.core.contracts.constraints/=
        t__3815__auto__
        (clojure.core/type r__3816__auto__))))

Perhaps we should be doing an (instance? TopFilter r) here instead? The
output of `defrecord` seems to be out of date immediately when compiling.

Thanks,
Ambrose

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to