r568 | sperber | 2003-12-01 22:42:06 +0100 (Mon, 01 Dec 2003) | 4 lines
Changed paths:
M /s48/tuebingen/trunk/scheme/bcomp/comp-prim.scm
M /s48/tuebingen/trunk/scheme/rts/xnum.scm
Subject: Make INEXACT->EXACT work on exacts and vice versa
As discussed on the Scheme 48 mailing list, and requested by jar.
As stated in the subject line:
Welcome to scsh 0.6.7 (R6RS)
Type ,? for help.
> (string->number "1e2")
#f
Apply his suggested fix, which is taken from Scheme 48.
Original commit message from Mike Sperber:
Subject: Add implementation of FOR-EACH to SRFI-1
This was missing from Olin's reference implementation.
Note that currently, the native versions of MAP and FOR-EACH already
implement the extended semantics specified by SRFI 1. However, we
might want to enforce the R5RS restrictions to MAP and FOR-EACH at
some time in the future, so it still makes sense to have separate
implementations in SRFI 1.
Chris Hanson from MIT Scheme granted the new license in a private
email on 12 Dec 2003.
In addition, I added a private email from Olin, saying that the MIT
code has nothing in common with MIT Scheme anymore.
type->sexp was not capable of converting the variable type to a
sexp. This caused problems if the module system wanted to tell the
user that the types of exported bindings did not match:
config> (define-structure foo (export (bar :syntax)) (open scheme) (begin (define bar 1)))
; no values returned
config> ,user
> ,open foo
Error: exception
wrong-type-argument
(checked-record-ref '(variable #{Type :value #f #f}) '#{Record-type 14 meta-type} 1)
I've now extended TYPE->SEXP by a check for the variable type and let
it produce a list with 'VARIABLE as first and the actual type as
second element. Likewise, I extended SEXP->TYPE to produce a variable
type if 'VARIABEL is the first element of a list.
This seems to work but a second look by someone who really understands
the type system would be appreciated.
(Merge from s48 rev 423)