[Ecls-list] gray-stream support

Geo Carncross geocar at gmail.com
Tue May 6 12:19:38 UTC 2008


On Tue, May 6, 2008 at 3:24 AM, Juan Jose Garcia-Ripoll
<jjgarcia at users.sourceforge.net> wrote:
>  Hutchentoot has its own package, doesn't it? Why not modify the
>  package definition
>
>  (defpackage hutchentoot
>   ...
>   (use :gray))

I modified trivial-gray-streams's package to look like this:

  `(defpackage :trivial-gray-streams
	    (:use #+ecl :gray #-ecl :cl)
	    (:import-from #+sbcl :sb-gray
			  #+allegro :excl
			  #+cmu :ext
			  #+clisp :gray
			  #+openmcl :ccl
                         #+ecl :gray
			  #+lispworks :stream
			  #-(or sbcl allegro cmu clisp openmcl lispworks ecl) ...
			  , at common-symbols)

Because it is it, of course, not hunchentoot, that needs the gray
streams. I get this error however:

An error occurred during initialization:
Cannot replace the lambda list of #<STANDARD-GENERIC-FUNCTION
GRAY:STREAM-READ-SEQUENCE> with (STREAM SEQUENCE START END
                                                   &KEY
&ALLOW-OTHER-KEYS) because it is incongruent with some of the methods.

So I then added #-ecl to the &allow-other-keys part, and that got
trivial-gray-streams to build. Flexi-streams complained about close
not being generic so I modified its defpackage to look like this:

(defpackage :flexi-streams
  (:use #-ecl :cl #+ecl :gray :trivial-gray-streams)
  (:nicknames :flex)
  #+:lispworks
  (:shadow :with-accessors)
  (:export :*default-eol-style*
           :*default-little-endian*
           :*substitution-char*
...


But that just gets me into a problem with:

An error occurred during initialization:
Cannot use #<"TRIVIAL-GRAY-STREAMS" package>
from #<"FLEXI-STREAMS" package>,
because TRIVIAL-GRAY-STREAMS:STREAM-READ-SEQUENCE and
GRAY:STREAM-READ-SEQUENCE will cause
a name conflict..


This seems like the wrong way to go. Perhaps it would be cleaner for
ecl's GRAY: to also provide TRIVIAL-GRAY-STREAMS:. Perhaps T-G-S:
could simply perform the fdefinition-patch that I suggested earlier.

Advice?




More information about the ecl-devel mailing list