[ create a new paste ] login | about

Link: http://codepad.org/IMINawCS    [ raw code | output | fork ]

Scheme, pasted on Jul 22:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
;; define a package that doesnt USE anything
CL-USER> (defpackage :foo)
#<PACKAGE "FOO">

;; go into that package
CL-USER> (in-package :foo)
#<COMMON-LISP:PACKAGE "FOO">

;; make a symbol (which will get interned into FOO)
FOO> 'in-package
IN-PACKAGE

;; try using the package CL, which already has "IN-PACKAGE" interned into it
FOO> (cl:use-package :cl)
ERROR: COMMON-LISP:USE-PACKAGE #<COMMON-LISP:PACKAGE "COMMON-LISP">
causes name-conflicts in #<COMMON-LISP:PACKAGE "FOO"> between
the following symbols:
  FOO::IN-PACKAGE, COMMON-LISP:IN-PACKAGE


Output:
1
reference to undefined identifier: CL-USER>


Create a new paste based on this one


Comments: