This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: simple question


Paul.Emsley@chem.gla.ac.uk writes:

> #!/usr/local/bin/guile \
> -s
> !#
> (use-modules (ice-9 slib))
> (require 'format)
> (format #t "Hello ~a~%" "bill")
> 
> 	I mean that the format expansion only works in "interactive"
>       mode.  Can I have it working in script mode (or whatever it's
>       called) too? 

The problem occurs because, currently, scripts are evaluated in the
core module (guile) which provides a simple form of `format'.

Normally when you tell Guile to use a module, bindings from that
module will shadow bindings imported from (guile).  But bindings
imported from another module can't shadow bindings within the module
your code resides in.

There are two Guile bugs here:

1. That scripts are evaluated in the (guile) module is a bug.  The
   question is in which module scripts should be evaluated.  I propose
   `(guile-script)'.  `(guile-user)' is a dedicated interactive
   environment containing bindings for interactive use.

2. The simple format provided by (guile) should be case independent.

     (format #t "Hello ~A~%" "bill")

   currently works also for simple format.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]