Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!gatech!EU.net!uknet!newsfeed.ed.ac.uk!edcogsci!usenet
From: tfb@cogsci.ed.ac.uk (Tim Bradshaw)
Subject: Dumping definitions of (circular) structures in cmucl 17f
Message-ID: <TFB.95May31052633@burns.cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: burns
Organization: C.O.I.T
Date: Wed, 31 May 1995 04:26:33 GMT
Lines: 32

Given a structure like:

(defstruct node
  (edges '() :type list))

I want to be able to do this:

(defvar *my-graph*
  #s(node :edges ()))

When I try to compile such a file in cmucl it refuses, saying

 "Error in function kernel:make-structure-load-form:
    Structures of type node cannot be dumped as constants."

I've tried various things with make-load-form (which doesn't seem to
work: it seems to have different numbers of arguments than CLTL2
specifies) &c, but to no avail.

Looking in defstruct.lisp it does some stuff with the
structure-class-make-load-form, so I tried changing that slot to be
:just-dump-it-normally in my structure's class, and it *seems* to
work, but I don't see why it should work (or why it shouldn't in
fact).

This must be a problem other people have had. Any ideas?

Thanks

--tim
-- 
Any camel in a storm
