[Top][All Lists]

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

Re: Why is package user not an environment in MIT Scheme 10.1?

From: Chris Hanson
Subject: Re: Why is package user not an environment in MIT Scheme 10.1?
Date: Sun, 17 Nov 2019 01:40:33 -0800
User-agent: Roundcube Webmail/1.3.8

The change is mainly because package objects are being phased out, and will eventually be replaced by R7RS libraries.

You can of course use (->environment '(user)) instead.

On 2019-11-16 21:53, Lone Learner wrote:
Here is my MIT Scheme code:

(display (name->package '(user)))
(->environment (name->package '(user)))

This runs fine on MIT/GNU Scheme Release 9.1.1. Here is the output:

$ scheme --quiet --load foo.scm
#[package 13 (user)]

But when I run this with MIT/GNU Scheme Release 10.1.5, I get this error:

$ mit-scheme --quiet --load foo.scm
#[package 12 (user)]
;The object #[package 12 (user)], passed as an argument to
->environment, is not an environment.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.

2 error>

On debugging I get this,

2 error> (debug)

There are 7 subproblems on the stack.

Subproblem level: 0 (this is the lowest subproblem level)
Compiled code expression unknown
#[compiled-return-address 13 ("rep" #x2f) #xd8 #x95ed10]
There is no current environment.
There is no execution history for this subproblem.
You are now in the debugger.  Type q to quit, ? for commands.

3 debug>

Why does this error occur in 10.1.5 but not in 9.1.1?

reply via email to

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