guile-user
[Top][All Lists]
Advanced

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

Re: syncase code issue 1.8.8 -> 2.0.11


From: Matt Wette
Subject: Re: syncase code issue 1.8.8 -> 2.0.11
Date: Thu, 18 Sep 2014 05:35:04 -0700

On Sep 18, 2014, at 3:20 AM, Taylan Ulrich Bayirli/Kammer <address@hidden> 
wrote:
> 
> I see your code is doing things like
> 
> (format #t "~a\n" (define mt (make-tokiz "abc=def")))
> 
> The argument to `format' there is necessarily an "expression" in the
> grammar of Scheme.  Definitions like (define ...) are not a valid type
> of expression in Scheme.

yes, just debug that didn't matter - please disregard


> The only places you can use definitions are
> 
> - the top-level of a program/library
> 
> - the *beginning* of a "code body" like the body of a `lambda', the body
>  of a `let', etc. can have a sequence of definitions; the first
>  non-definition expression terminates that sequence
> 
> - when you have a (begin ...) form in a position where a definition
>  would otherwise be allowed, then the body of this begin may also start
>  with a series of definitions; again, the first non-definition
>  expression terminates this sequence

This is syntax-case.   Go check share/guile/2.0/boot-9/psyntax.scm for similar 
code.

Matt




reply via email to

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