[Top][All Lists]

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

[Chicken-janitors] Re: #113: Crunch egg: bug in define-crunch-primitives

From: Chicken Trac
Subject: [Chicken-janitors] Re: #113: Crunch egg: bug in define-crunch-primitives / define-crunch-callback
Date: Mon, 15 Feb 2010 09:50:56 -0000

#113: Crunch egg: bug in define-crunch-primitives / define-crunch-callback
 Reporter:  jeronimo    |       Owner:       
     Type:  defect      |      Status:  new  
 Priority:  minor       |   Milestone:       
Component:  extensions  |     Version:  4.2.x
 Keywords:  crunch      |  

Comment(by jeronimo):

 > crunch has its own type-system and does not handle Scheme data well
 (since it generates a more or less direct translation to C++, it uses C++
 data types).

 OK, I understand what you mean.

 By the way, it seems that with current git HEAD, crunch doesn't compile
 loops properly.
 The example in fails (my other
 attempts to compile do-loops and named lets failed in the same way --
 crunch claims that I've put a loop variable not in a tail position):

 $ csc -o crunch-example -D crunched -c++ crunch-example.scm

 Error: during expansion of (crunch ...) - [crunch] (in string-reverse)
 call to loop variable not in tail position: doloop


         (define string-reverse ...)
         (let () ...)
         (let ((n (string-length str))) ...)
         (let ((s2 (make-string n #\space))) ...)
         (let ((i 0)) ...)
         (if (>= i n) ...)
         (doloop (add1 i))

         Call history:

         <syntax>                (##core#begin (crunch (define (string-
 reverse str) (let* ((n (string-length str)) (s2 (make-string n...
         <syntax>                (crunch (define (string-reverse str) (let*
 ((n (string-length str)) (s2 (make-string n #\space))) (do...        <--

 Error: shell command terminated with non-zero exit status 17920:
 /usr/local/bin/chicken crunch-example.scm -output-file crunch-example.cpp
 -feature crunched

 I just copied and paster the example from the doc page into crunch-
 example.scm, without changes.

Ticket URL: <>
Chicken Scheme <>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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