On Tue, Mar 11, 2014 at 9:20 PM, Daniel Carrera <[email protected]> wrote:

>
> On 11 March 2014 12:41, Alex Shinn <[email protected]> wrote:
>
>> Chibi has string-map in (chibi string).
>>
>> But actually, if you're aiming for R7RS support then
>> string-map is in (scheme base).  Just replace the
>> cond-expand with:
>>
>> (import (scheme base))
>>
>
> Hmm... sadly, (import (scheme base)) fails with Chicken and Gauche. I am
> also having a hard time figuring out how to print with Chibi. I tried the
> manual, and I tried (print), (printf) and (display).
>

Then change your cond-expand to:

(cond-expand
 ((or chicken gauche)  ; compatibility
  (use srfi-13))
 (else                 ; R7RS
  (import (scheme base) (scheme write))))

R7RS puts display in (scheme write), because it typically
falls back to write for non-char/strings, and because write
is actually a fairly large and complicated procedure not
needed by most libraries.

However, write-char, write-string and newline are all in
(scheme base) so you could just use write-string here.

You can also (import (scheme r5rs)) to get all of the R5RS
bindings except transcript-on/off.

-- 
Alex
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to