unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* reload-module usage
@ 2010-11-19  6:27 Ramakrishnan Muthukrishnan
  2010-11-19 15:17 ` Ramakrishnan Muthukrishnan
  0 siblings, 1 reply; 5+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2010-11-19  6:27 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

Hi,

How to use the `reload-module' function? For eg:

> (use-modules (tekuti boot))
...
[do some editing in tekuti/boot.scm]
...
[now back to the repl]
> (reload-module (tekuti boot))

This gives the following output:

> (reload-module (tekuti boot))
<stdin>:18:15: warning: possibly unbound variable `tekuti'
<unnamed port>:18:16: In procedure module-lookup:
<unnamed port>:18:16: Unbound variable: tekuti

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
>

Perhaps I am missing something. Can't we specify the module name as we
specified in the use-module?

thanks
-- 
  Ramakrishnan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reload-module usage
  2010-11-19  6:27 reload-module usage Ramakrishnan Muthukrishnan
@ 2010-11-19 15:17 ` Ramakrishnan Muthukrishnan
  2010-11-19 15:47   ` Andy Wingo
  0 siblings, 1 reply; 5+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2010-11-19 15:17 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

On Fri, Nov 19, 2010 at 11:57 AM, Ramakrishnan Muthukrishnan
<vu3rdd@gmail.com> wrote:
>
>> (reload-module (tekuti boot))
> <stdin>:18:15: warning: possibly unbound variable `tekuti'
> <unnamed port>:18:16: In procedure module-lookup:
> <unnamed port>:18:16: Unbound variable: tekuti
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.

`reload-module' is indeed a function which explains the error. How do
we specify a module name?

-- 
  Ramakrishnan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reload-module usage
  2010-11-19 15:47   ` Andy Wingo
@ 2010-11-19 15:46     ` Ramakrishnan Muthukrishnan
  2010-11-19 15:50     ` Andy Wingo
  1 sibling, 0 replies; 5+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2010-11-19 15:46 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

On Fri, Nov 19, 2010 at 9:17 PM, Andy Wingo <wingo@pobox.com> wrote:
> On Fri 19 Nov 2010 16:17, Ramakrishnan Muthukrishnan <vu3rdd@gmail.com> writes:
>
>> On Fri, Nov 19, 2010 at 11:57 AM, Ramakrishnan Muthukrishnan
>> <vu3rdd@gmail.com> wrote:
>>>
>>>> (reload-module (tekuti boot))
>>> <stdin>:18:15: warning: possibly unbound variable `tekuti'
>>> <unnamed port>:18:16: In procedure module-lookup:
>>> <unnamed port>:18:16: Unbound variable: tekuti
>>>
>>> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
>>
>> `reload-module' is indeed a function which explains the error. How do
>> we specify a module name?
>
> It is a function that takes a module as an argument.
>
>  (reload-module (resolve-module (tekuti boot)))
>
> would be how to use it. I'll add a REPL meta-command that takes a
> name. Having the core procedure take a module instead of a name takes
> away an error case -- what if it wasn't loaded before, do we load it for
> the first time?

Thanks Andy.

-- 
  Ramakrishnan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reload-module usage
  2010-11-19 15:17 ` Ramakrishnan Muthukrishnan
@ 2010-11-19 15:47   ` Andy Wingo
  2010-11-19 15:46     ` Ramakrishnan Muthukrishnan
  2010-11-19 15:50     ` Andy Wingo
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Wingo @ 2010-11-19 15:47 UTC (permalink / raw)
  To: Ramakrishnan Muthukrishnan; +Cc: guile-user

On Fri 19 Nov 2010 16:17, Ramakrishnan Muthukrishnan <vu3rdd@gmail.com> writes:

> On Fri, Nov 19, 2010 at 11:57 AM, Ramakrishnan Muthukrishnan
> <vu3rdd@gmail.com> wrote:
>>
>>> (reload-module (tekuti boot))
>> <stdin>:18:15: warning: possibly unbound variable `tekuti'
>> <unnamed port>:18:16: In procedure module-lookup:
>> <unnamed port>:18:16: Unbound variable: tekuti
>>
>> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
>
> `reload-module' is indeed a function which explains the error. How do
> we specify a module name?

It is a function that takes a module as an argument.

  (reload-module (resolve-module (tekuti boot)))

would be how to use it. I'll add a REPL meta-command that takes a
name. Having the core procedure take a module instead of a name takes
away an error case -- what if it wasn't loaded before, do we load it for
the first time?

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reload-module usage
  2010-11-19 15:47   ` Andy Wingo
  2010-11-19 15:46     ` Ramakrishnan Muthukrishnan
@ 2010-11-19 15:50     ` Andy Wingo
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Wingo @ 2010-11-19 15:50 UTC (permalink / raw)
  To: Ramakrishnan Muthukrishnan; +Cc: guile-user

On Fri 19 Nov 2010 16:47, Andy Wingo <wingo@pobox.com> writes:

>   (reload-module (resolve-module (tekuti boot)))

Doh, I meant

    (reload-module (resolve-module '(tekuti boot)))
                                   ^
                 quote. it's like the pinky finger. small but important

-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-19 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19  6:27 reload-module usage Ramakrishnan Muthukrishnan
2010-11-19 15:17 ` Ramakrishnan Muthukrishnan
2010-11-19 15:47   ` Andy Wingo
2010-11-19 15:46     ` Ramakrishnan Muthukrishnan
2010-11-19 15:50     ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).