clasp-developers / clasp

clasp Common Lisp environment
https://clasp-developers.github.io/
2.57k stars 145 forks source link

IN-PACKAGE returns no value instead of package #183

Closed GOFAI closed 7 years ago

GOFAI commented 8 years ago
CL-USER> (ql:quickload :iterate)
To load "iterate":
  Load 1 ASDF system:
    iterate
; Loading "iterate"

(:ITERATE)
CL-USER> (in-package :iterate)
; No value

Whereas in sbcl:

CL-USER> (in-package :iterate)
#<PACKAGE "ITERATE">
drmeister commented 8 years ago

GOFAI - thanks for these! I'll get to them soon. We are working on cleaning up the code for a little while.

Shinmera commented 8 years ago

Can confirm on b8c6690535bdc61bfdaeb50dbe23cd89633200a5

> (in-package #:cl)

COMMON-LISP> 
Shinmera commented 8 years ago

Returns NIL on 99669d674a6f2b7ce0a9127cf6537fc03066baa5, so still not quite right.

Bike commented 8 years ago

The easy fix would be to define in-package like so

(defmacro in-package (name)
  `(eval-when (:compile-toplevel :load-toplevel :execute)
     (si::select-package ,(string name))
     *package*))