guile-user
[Top][All Lists]
Advanced

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

Re: parse-tree-il rejects '(define ...)


From: Matt Wette
Subject: Re: parse-tree-il rejects '(define ...)
Date: Thu, 17 Sep 2015 19:46:24 -0700

> On Sep 17, 2015, at 7:36 PM, Mark H Weaver <address@hidden> wrote:
> 
> Matt Wette <address@hidden> writes:
> 
>> This is guile 2.0.11. 
>> 
>> I think I’m following what is in the reference manual. 
>> 
>> Any clue what the problem is? — Matt
>> 
>> scheme@(guile-user)> (define t1 '(begin (define (toplevel x) 1)))
>> 
>> scheme@(guile-user)> (parse-tree-il t1)
>> 
>> ERROR: In procedure scm-error:
>> 
>> ERROR: unrecognized tree-il (define (toplevel x) 1)
> 
> There are two problems here:
> 
> * You cannot have a bare '1' like that.  It must instead be (const 1).

Yup, forgot that in the simple one-liner.

> * The second operand to 'define' should just be the symbol, not
>  (toplevel <symbol>).  The manual was incorrect about this; it is now
>  fixed in commit 4fd7ad6f85c0c83f4ba329c491838ade813beb8a.

Yes. Getting no errors now.  Thanks.

And thanks for the tip on unparse.

Matt




reply via email to

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