[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Default initialization of a typed DEFSTRUCT slot
- To: att!rascal.ics.utexas.edu!kcl
- Subject: Default initialization of a typed DEFSTRUCT slot
- From: ihlpf!lgm@att.att.com
- Date: Tue, 20 Jun 89 15:15 CDT
- >from: ihlpf!lgm (Lawrence G Mayka +1 312 416 5166)
- Posted-date: Tue, 20 Jun 89 15:15 CDT
The latest AKCL version I've fetched, AKCL 1.175, seems overly
strict about the default initializer on a DEFSTRUCT slot. If the
slot is typed via the :TYPE option, AKCL 1.175 requires the
initializer to be a simple constant (instead of a generic form).
A sample log is attached.
Looking at the log, one also notices that AKCL 1.175 seems to think
FIXNUM is synonymous with (INTEGER -1 2147483647). Shouldn't that be
(INTEGER -2147483648 2147483647)?
Lawrence G. Mayka
AT&T Bell Laboratories
lgm@ihlpf.att.com
_____________________
Starts dribbling to typestruc (1989/6/20, 14:8:44).
NIL
>
(defconstant zero 0)ZERO
>
(defstruct struc1 (field zero))MAKE-STRUC1
>
(defstruct struc2 (field zero :type fixnum))
Error: Cannot coerce ZERO to (INTEGER -1 2147483647).
Error signalled by PROGN.
Broken at PROGN. Type :H for Help.
>>
:q
Top level.
>(dribble)
________________________
From: vargasje%midway.ece.scarolina.edu@RELAY.CS.NET
Received: by CLI.COM (4.0/1); Tue, 20 Jun 89 19:45:36 CDT
Message-Id: <8906210045.AA17140@CLI.COM>
Received: from relay2.cs.net by RELAY.CS.NET id aa02205; 20 Jun 89 20:44 EDT
Received: from ece.scarolina.edu by RELAY.CS.NET id aa01956; 20 Jun 89 20:40 EDT
To: kcl@CLI.COM
Subject: two questions
Date: Tue, 20 Jun 89 13:04:36 EDT
Sender: vargasje%midway.ece.scarolina.edu@RELAY.CS.NET
Two questions:
1) Has anybody ported akcl to the SUN386i?
2) Given a simple function like (defun sum () (+ 2 3))
has anybody written code to execute that function as an independent
process?
Juan E. Vargas
vargasje@midway.ece.scarolina.edu
From: cli!rascal.ics.utexas.edu!amb@cs.utexas.edu@att.att.com
Received: by CLI.COM (4.0/1); Wed, 21 Jun 89 06:44:58 CDT
Received: from rascal.ics.utexas.edu by cs.utexas.edu (5.59/36.2)
id AA14675; Wed, 21 Jun 89 06:44:50 CDT
Received: from arpa.att.com by rascal.ics.utexas.edu (3.2/4.22)
id AA08857; Wed, 21 Jun 89 06:44:19 CDT
Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with UUCP
id AA13080; Wed, 21 Jun 89 03:24:17 -0400
Received: by cs.utexas.edu (5.59/36.2)
id AA01404; Wed, 21 Jun 89 01:17:10 CDT
Received: by CLI.COM (4.0/1); Tue, 20 Jun 89 23:46:13 CDT
Posted-Date: Tue, 20 Jun 89 23:45:36 CDT
Received: from rascal.ics.utexas.edu by cs.utexas.edu (5.59/36.2)
id AA23818; Tue, 20 Jun 89 23:46:05 CDT
Date: Tue, 20 Jun 89 23:45:36 CDT
Message-Id: <8906210445.AA08276@rascal.ics.utexas.edu>
Received: by rascal.ics.utexas.edu (3.2/4.22)
id AA08276; Tue, 20 Jun 89 23:45:36 CDT
To: att.att.com!ihlpf!lgm@cs.UTEXAS.EDU
Cc: cli!att!rascal.ics.utexas.edu!kcl
In-Reply-To: ihlpf!lgm@att.att.com's message of Tue, 20 Jun 89 15:15 CDT <8906202342.AA07424@rascal.ics.utexas.edu>
Subject: Default initialization of a typed DEFSTRUCT slot
>The latest AKCL version I've fetched, AKCL 1.175, seems overly
>strict about the default initializer on a DEFSTRUCT slot. If the
>slot is typed via the :TYPE option, AKCL 1.175 requires the
>initializer to be a simple constant (instead of a generic form).
Your bug had already been noticed and fixed. Bill Schelter will return
from Europe in about ten days and a new release will be
forthcoming.
If you need a patch now, in defstruct.lsp replace the line
(setf (cadr v) (coerce (second v) type)))
with
(setf (cadr v) `(coerce ,(second v) ,type)))
When you load the patched file into LISP it will complain but
defstruct should work.
Mike B