[cl-unification-devel] Problems compiling code use #T template
John Leuner
jewel at subvert-the-dominant-paradigm.net
Fri Jun 16 15:51:39 UTC 2006
Someone on #lisp told me that it wasn't a problem with the reader macro,
at least he said that the problem is that SBCL can't write this object
to the fasl file.
So I tried it with SBCL without loading SLIME:
* (asdf:oos 'asdf:load-op 'unification)
; loading system definition
from /home/jbominji/.sbcl/systems/unification.asd
* (compile-file "extra.lisp")
; compiling file "/home/jbominji/jbominji/extra.lisp" (written 16 JUN
2006 10:43:55 PM):
; compiling (IN-PACKAGE :CL-USER); in:
; LAMBDA (#:G14 #:G15
; #:G16
; #:G17
; #:G18
; #:G19
; #:G20
; #:G21
; #:G22
; #:G23
; #:G24
; #:G25
; ...)
; (TYPEP SB-PCL::.ARG1. 'CONS)
; --> CONSP
; ==>
; SB-PCL::.ARG1.
;
; note: deleting unreachable code
; (TYPEP SB-PCL::.ARG1. 'SYMBOL)
; --> SYMBOLP
; ==>
; SB-PCL::.ARG1.
;
; note: deleting unreachable code
;
; note: deleting unreachable code
; compiling (DEFUN CHECK-RECIPIENT ...)
; file: /home/jbominji/jbominji/extra.lisp
; in: DEFUN CHECK-RECIPIENT
; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 3))
; ==>
; #T(LIST ?A ?B ?C)
;
; caught ERROR:
; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM
method called).
;
; note: The first argument never returns a value.
; '(1 2 3)
;
; note: deleting unreachable code
;
; compilation unit finished
; caught 1 ERROR condition
; printed 5 notes
; /home/jbominji/jbominji/extra.fasl written
; compilation finished in 0:00:01
#P"/home/jbominji/jbominji/extra.fasl"
T
where extra.lisp has:
(defun check-recipient ()
(unify:find-variable-value '?a (unify:unify #T(list ?a ?b ?c) '(1 2
3))))
Does that help? Since coming across this problem I've done some reading
about reader macros, it seems simple in principle but I don't understand
the relationships between what reader macros are installed at
compile-time when compiling which packages etc.
John
On Fri, 2006-06-16 at 15:33 +0200, Marco Antoniotti wrote:
> Hi
>
> I do not know if this is a problem with CL-UNIFICATION or SLIME. It
> seems it is something to do with SLIME. What happened if you try to
> COMPILE-FILE the code?
>
> Cheers
> --
> Marco
>
>
>
>
>
>
> On Jun 14, 2006, at 2:32 PM, John Leuner wrote:
>
> > When I compile the following code in SBCL (using C-c C-k in Slime),
> >
> > (in-package :cl-user)
> >
> > (defun check-recipient ()
> > (unify:unify #T(list ?a ?b ?c) '(1 2 3)))
> >
> > I get this error report:
> >
> >
> > ;
> > file: /home/jbominji/jbominji/extra.lisp
> > ; in: DEFUN
> > CHECK-RECIPIENT
> > ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2
> > 3))
> > ;
> > ==>
> > ;
> > #T(LIST ?A ?B ?C)
> > ;
> > ; caught
> > ERROR:
> > ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM
> > method
> > called).
> > ;
> > ; note: The first argument never returns a
> > value.
> >
> > ; '(1 2
> > 3)
> > ;
> > ; note: deleting unreachable
> > code
> > ;
> > ; compilation unit
> > finished
> > ; caught 1 ERROR
> > condition
> > ; printed 2
> > notes
> >
> > ; /home/jbominji/jbominji/extra.fasl
> > written
> > ; compilation finished in
> > 0:00:00
> > STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN
> >
> > This code works when the compiler does not have to write a fasl file.
> >
> > What should I be doing to allow make-load-form to succeed?
> >
> > Thanks
> > John Leuner
> >
> >
> > _______________________________________________
> > cl-unification-devel site list
> > cl-unification-devel at common-lisp.net
> > http://common-lisp.net/mailman/listinfo/cl-unification-devel
> >
> --
> Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa
> NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
> 715 Broadway 10th FL fax. +1 - 212 - 998 3484
> New York, NY, 10003, U.S.A.
>
> _______________________________________________
> cl-unification-devel site list
> cl-unification-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cl-unification-devel
More information about the cl-unification-devel
mailing list