[Top][All Lists]

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

Re: [Chicken-users] Module unresolved error

From: John Cowan
Subject: Re: [Chicken-users] Module unresolved error
Date: Wed, 15 Jun 2016 13:05:47 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

Michael Silver scripsit:

> > That's because the interpreter implicitly loads some modules, and the
> > compiler doesn't do that.
> That’s odd; I would expect both to implicitly load those modules because the 
> documentation for both data-structures 
> <> 
> and ports <> say 
> both modules are "used by default, unless the program is compiled with the 
> --explicit-use option”, which I was not using (at least intentionally).

It's not so much the compiler vs. the interpreter (though there
is a difference), but being in a module vs. not being in a module.
The interpreter loads certain units and imports them into the top level.
Once inside a module, however, nothing is available except the name
`import`, so the first order of business is to import identifiers from
scheme and chicken to bootstrap a sufficient environment to do anything.
This is equally true in the interpreter, but doesn't come up much because
most people don't type module forms to the REPL or try to execute modules
as scripts.

John Cowan        address@hidden
You are a child of the universe no less than the trees and all other acyclic
graphs; you have a right to be here.  --DeXiderata by Sean McGrath

reply via email to

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