[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] problems with datatype and eopl 3-5
From: |
Ulrich Vollert |
Subject: |
[Chicken-users] problems with datatype and eopl 3-5 |
Date: |
Sat, 21 Apr 2007 21:36:00 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (Windows/20070221) |
Hello,
while reading "Essentials of Programming Languages"
(http://www.cs.indiana.edu/eopl/), I am learning Scheme and exercising
with Chicken (thanks to Felix ;-))
While using datatype.egg and the source code from the book (see the URL
above), I get an error with the examples from chapter 3.5. I did
(load "r5rs.scm")
(load "sllgen.scm")
(require-for-syntax 'datatype)
(load "test-harness.scm")
(load "test-suite.scm")
(load "3-5.scm")
(run-all)
Error: bad argument type to `cases'
Why?
When using syntax-case.egg and
(for-each load
'("r5rs.scm" "sllgen.scm" "define-datatype.scm"
"test-harness.scm" "test-suite.scm"))
(load "3-5.scm")
(run-all)
everything is fine.
I found out that scan&parse of 3-5.scm produces a result, but seems to
answer a different type as with the define-datatype.scm...???
Secondly, I was surprised about a performance comparison between chicken
and scheme48 when trying out the above commands on my desktop:
(run-all) needs 3.187 seconds in csi, but only 0.28 seconds in scheme48
- which is a factor of 11.
Even worse is this comparison on my tiny, but slow PDA Sharp Zaurus C860
(from www.trisoft.de) which is running under Linux and where I compiled
succesfully Chicken and Scheme48:
(run-all) takes 114.42 seconds in csi, but only 5.7 seconds in scheme48
- which is a factor of 20.
Any explanation for this?
Kindly regards,
Ulrich
- [Chicken-users] problems with datatype and eopl 3-5,
Ulrich Vollert <=