On Sat, Jun 1, 2013 at 7:41 PM, Eric Marsden <eric.mars...@free.fr> wrote:

> > (lisp-implementation-version)
> "13.5.1"
> > (defun foo ()
>    (typep t 'boolean))
> FOO
> > (compile 'foo)
> ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
> ;;;
> ;;; End of Pass 1.
> FOO
> NIL
> NIL
> > (foo)
> (T)    ;; <-- expected: T
>

Your expectation is bogus. TYPEP returns a logical true, which may be any
object that is not NIL. ECL translates (TYPEP X 'BOOLEAN) into (MEMBER X
'(NIL T)).

http://www.lispworks.com/documentation/HyperSpec/Body/f_typep.htm
http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_g.htm#generalized_boolean

Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to