[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Error 70, what does it mean?

From: Michael Erdmann
Subject: Re: [Chicken-users] Error 70, what does it mean?
Date: Tue, 28 Sep 2004 16:25:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

Felix Winkelmann wrote:
Michael Erdmann wrote:

Hallo, i am trying to compile slib, and i get the following strange

chicken -syntax fluidlet.scm
compiling `fluidlet.scm' ...
Error: #(syntax-object fluid-let ((#f top) shift #(ribcage (#(import-token *top*)) () ())))

make: *** [fluidlet.c] Error 70

Error 70, what doe it mean?

70 is just the standard error return code (EX_SOFTWARE in

Thw actual problem appears to be that you are compiling
SLIBs version of the fluid-let macro in "high-level macro"
mode (with syntax-rules/syntax-case macros enabled).
You don't really need that, since Chicken already supports
fluid-let, though.
I can't tell you exactly what happens here, probably the
definition of the macro does something fishy.
Could you show me the actual source-code?

Well i have managed to come around this problem, but actually
i am not sure what i have done. First of all i did run chicken

address@hidden:~/scheme/slib> csc -c  fluidlet.scm
Error: syntax error in line 22 - malformed expression `(clauses . body)'
*** Shell command terminated with exit status 1: /usr/local/bin/chicken fluidlet.scm -output-file fluidlet.c -quiet

which was leading me to the dot in the argument list, which
i found strange as well. I have deleted this '.' and the component
compiles :-)  Bit i am not sure if this is correct!

; "fluidlet.scm", FLUID-LET for Scheme
; Copyright (c) 1998 Aubrey Jaffer
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;1.  Any copy made of this software must include this copyright notice
;in full.
;2.  I have made no warranty or representation that the operation of
;this software will be error-free, and I am under no obligation to
;provide any services, by way of maintenance, update, or otherwise.
;3.  In conjunction with products arising from the use of this
;material, there shall be no use of my name in any advertising,
;promotional, or sales literature without prior written consent in
;each case.

(require 'dynamic-wind)
(defmacro fluid-let (clauses . body)
  (let ((ids (map car clauses))
        (new-tmps (map (lambda (x) (gentemp)) clauses))
        (old-tmps (map (lambda (x) (gentemp)) clauses)))
    `(let (,@(map list new-tmps (map cadr clauses))
           ,@(map list old-tmps (map (lambda (x) #f) clauses)))
           (lambda ()
             ,@(map (lambda (ot id) `(set! ,ot ,id))
                    old-tmps ids)
             ,@(map (lambda (id nt) `(set! ,id ,nt))
                    ids new-tmps))
           (lambda () ,@body)
           (lambda ()
             ,@(map (lambda (nt id) `(set! ,nt ,id))
                    new-tmps ids)
             ,@(map (lambda (id ot) `(set! ,id ,ot))
                    ids old-tmps))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]