Remove obsolete code for setting some AUTOLOAD properties
[maxima.git] / src / maxima-package.lisp
blobb47340e728b878cf813f850de6bc0b8753cf2686
1 (in-package :common-lisp-user)
3 (defpackage :maxima-nregex
4 (:use :common-lisp)
5 (:export
6 ;; vars
7 #:*regex-debug* #:*regex-groups* #:*regex-groupings*
8 ;; functions
9 #:regex-compile
12 (defpackage :cl-info
13 (:use :common-lisp))
15 (defpackage :command-line
16 (:use :common-lisp)
17 (:nicknames :cmdline)
18 (:export #:cl-option #:make-cl-option #:list-cl-options #:process-args
19 #:get-application-args))
21 ;; Kevin Rosenberg's getopt package
22 (defpackage getopt
23 (:use :cl)
24 (:export #:match-unique-abbreviation
25 #:getopt))
27 ;; GCL has SLOOP built in but it's slightly different now...
28 (defpackage :cl-sloop
29 (:use :common-lisp)
30 (:export #:sloop))
32 (defpackage :maxima
33 (:use :common-lisp :command-line)
34 ;; Gcl has DEFINE-COMPILER-MACRO but it's in the SYSTEM package. So
35 ;; we shadowing import it into our package here. (Can't just import
36 ;; because there's already a DEFINE-COMPILER-MACRO symbol.)
37 #+gcl
38 (:shadowing-import-from #:system #:define-compiler-macro)
39 (:nicknames :cl-macsyma :cl-maxima :macsyma)
40 (:import-from :cl-sloop #:sloop)
41 (:shadow continue ;(macsys): part of the top-level loop
42 // ;(clmacs): arithmetic operator
43 float ;(clmacs): has 1.0 as default format
44 functionp ;(commac): accepts symbols
45 array ;(commac)
46 exp ;various files declare this special
47 signum ;(commac): same except
48 ; (cl:signum 1.3)==1.0 not 1 but I (?)
49 ; think this is ok for macsyma
50 atan ;(zl:atan y x) == (cl:atan y x) + 2 pi
51 ; if latter is negative
52 asin acos asinh acosh atanh ;different for complex numbers
53 tanh cosh sinh tan ;(trigi): same, could remove from trigi
54 break ; special variable in displa.lisp
55 gcd ; special in rat module
56 #+(and sbcl sb-package-locks) makunbound)
57 #+gcl
58 (:import-from :system
59 ;; Faster modular arithmetic.
60 ;; Unfortunately, as S. Macrakis observed (bug #706562),
61 ;; SI::CMOD currently behaves in a strange way:
62 ;; (let ((si::modulus 4)) (si::cmod 2)) => 2
63 ;; (let ((si::modulus 4)) (si::cmod -2)) => -2
64 #:modulus #:cmod #:ctimes #:cdifference #:cplus
66 #:getpid #:get-instream
67 #:short-name #:cleanup #:instream-stream-name #:instream-line
68 #:instream-name #:instream-stream #:stream-name #:complete-prop
69 #:*stream-alist* #:break-call))
72 (defpackage :mt19937
73 (:use :common-lisp)
74 (:shadow #:random-state
75 #:random-state-p
76 #:random
77 #:*random-state*
78 #:make-random-state)
79 (:export #:random-state
80 #:random-state-p
81 #:random
82 #:*random-state*
83 #:make-random-state
84 #:%random-single-float
85 #:%random-double-float
86 #+(or scl clisp) #:%random-long-float
87 #+cmu #:%random-double-double-float
88 #:random-chunk
89 #:init-random-state))
91 ;; This package is for the implmentation of the BIGFLOAT routines that
92 ;; make working with Maxima's bfloat objects somewhat easier by
93 ;; extending the standard CL numeric functions to work with BIGFLOAT
94 ;; and COMPLEX-BIGFLOAT objects. See src/numeric.lisp for the
95 ;; implementation.
96 (defpackage bigfloat-impl
97 (:use :cl)
98 #+gcl
99 (:shadowing-import-from #:system #:define-compiler-macro)
100 (:shadow #:+
104 #:1+
105 #:1-
106 #:zerop
107 #:plusp
108 #:minusp
109 #:abs
110 #:sqrt
111 #:log
112 #:exp
113 #:sin
114 #:cos
115 #:tan
116 #:asin
117 #:acos
118 #:atan
119 #:sinh
120 #:cosh
121 #:tanh
122 #:asinh
123 #:acosh
124 #:atanh
125 #:expt
127 #:/=
130 #:<=
131 #:>=
132 #:scale-float
133 #:realpart
134 #:imagpart
135 #:complex
136 #:conjugate
137 #:max
138 #:min
139 #:cis
140 #:phase
141 #:floor
142 #:ffloor
143 #:incf
144 #:decf
145 #:realp
146 #:complexp
147 #:numberp
148 #:integer-decode-float
149 #:decode-float
150 #:float
151 #:ceiling
152 #:fceiling
153 #:truncate
154 #:ftruncate
155 #:round
156 #:fround
157 #:random
158 #:signum
159 #:float-sign
160 #:float-digits
161 #:rational
162 #:rationalize
163 #:coerce
165 ;; If any of these exported symbols are updated, update the
166 ;; shadowing-import-from list for BIGFLOAT-USER too!
168 ;; Export types
169 (:export #:bigfloat
170 #:complex-bigfloat)
171 ;; Export functions
172 (:export #:bigfloat
173 #:to
174 #:maybe-to
175 #:epsilon
176 #:%pi
177 #:%e
178 ;; CL equivalents
183 #:1+
184 #:1-
185 #:zerop
186 #:plusp
187 #:minusp
188 #:abs
189 #:sqrt
190 #:log
191 #:exp
192 #:sin
193 #:cos
194 #:tan
195 #:asin
196 #:acos
197 #:atan
198 #:sinh
199 #:cosh
200 #:tanh
201 #:asinh
202 #:acosh
203 #:atanh
204 #:expt
206 #:/=
209 #:<=
210 #:>=
211 #:scale-float
212 #:realpart
213 #:imagpart
214 #:complex
215 #:conjugate
216 #:max
217 #:min
218 #:cis
219 #:phase
220 #:floor
221 #:ffloor
222 #:incf
223 #:decf
224 #:realp
225 #:complexp
226 #:numberp
227 #:integer-decode-float
228 #:decode-float
229 #:float
230 #:ceiling
231 #:fceiling
232 #:truncate
233 #:ftruncate
234 #:round
235 #:fround
236 #:random
237 #:signum
238 #:float-sign
239 #:float-digits
240 #:rational
241 #:rationalize
242 #:coerce
245 ;; BIGFLOAT is the package intended to be used for applications
246 ;; using the routines from the BIGFLOAT-IMPL.
247 (defpackage bigfloat
248 (:use :cl :bigfloat-impl)
249 #+gcl
250 (:shadowing-import-from #:system #:define-compiler-macro)
251 ;; This list should match the SHADOWING-IMPORT-FROM list in
252 ;; BIGFLOAT-IMPL.
253 (:shadowing-import-from #:bigfloat-impl
258 #:1+
259 #:1-
260 #:zerop
261 #:plusp
262 #:minusp
263 #:abs
264 #:sqrt
265 #:log
266 #:exp
267 #:sin
268 #:cos
269 #:tan
270 #:asin
271 #:acos
272 #:atan
273 #:sinh
274 #:cosh
275 #:tanh
276 #:asinh
277 #:acosh
278 #:atanh
279 #:expt
281 #:/=
284 #:<=
285 #:>=
286 #:scale-float
287 #:realpart
288 #:imagpart
289 #:complex
290 #:conjugate
291 #:max
292 #:min
293 #:cis
294 #:phase
295 #:floor
296 #:ffloor
297 #:incf
298 #:decf
299 #:realp
300 #:complexp
301 #:numberp
302 #:integer-decode-float
303 #:decode-float
304 #:float
305 #:ceiling
306 #:fceiling
307 #:truncate
308 #:ftruncate
309 #:round
310 #:fround
311 #:random
312 #:signum
313 #:float-sign
314 #:float-digits
315 #:rational
316 #:rationalize
317 #:coerce
319 (:export #:lentz
320 #:sum-power-series
321 #:format-e
322 #:format-f
323 #:format-g))
325 ;; Export all the external symbols in BIGFLOAT-IMPL from BIGFLOAT too.
326 (do-external-symbols (s '#:bigfloat-impl)
327 (export s '#:bigfloat))
329 ;; For CMUCL, we lock the bigfloat-impl package so we don't
330 ;; accidentally modify the implementation.
331 #+cmu
332 (defun lock-maxima-packages ()
333 (let ((package-names '(#:bigfloat-impl)))
334 (dolist (p package-names)
335 (let ((p (find-package p)))
336 (when p
337 (setf (package-definition-lock p) t)
338 (setf (package-lock p) t)))))
339 (values))
342 #+cmu
343 (progn
344 (lock-maxima-packages)
345 (pushnew 'lock-maxima-packages ext:*after-save-initializations*))
348 ;; Some versions of CMUCL already have a compatible version of INTL,
349 ;; so skip it if we have it. CMUCL will already define the INTL
350 ;; package correctly.
352 #+#.(cl:if (cl:and (cl:member :cmu cl:*features*) (cl:find-package '#:intl)) '(or) '(and))
353 (defpackage :intl
354 (:use :common-lisp)
355 (:export #:setlocale #:textdomain #:gettext #:dgettext
356 #:ngettext #:dngettext
357 #:*translatable-dump-stream* #:*locale*
358 #:*locale-directories*
359 #:read-translatable-string)
360 #+gcl
361 (:shadowing-import-from #:system #:define-compiler-macro))
363 ;; (getalias '$lambda) => CL:LAMBDA, which implies that Maxima parses lambda as CL:LAMBDA.
364 ;; Unlocking the :common-lisp package seems to be the simplest way to avoid an error.
365 ;; (Shadowing LAMBDA causes errors and removing the alias causes some other errors. Oh well.)
366 #+(and sbcl sb-package-locks) (sb-ext:unlock-package :common-lisp)
368 (provide :maxima)