unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Request for assistance: (assertion-violation) unbound variable
@ 2017-06-08 10:28 Peter Silcock
       [not found] ` <CABPkNKk9Nm2GQ9=Su-B8jKrNsAwcow5FRqwOcz4dcCKQ3c7ELQ@mail.gmail.com>
  2017-06-11  6:23 ` Alex Vong
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Silcock @ 2017-06-08 10:28 UTC (permalink / raw)
  To: Guile Mailing List

As a newcomer to Guile/Scheme, I am working my way through some
exercises which require the use of an (assertion-violation) procedure
to trap an error condition, specifically:

(if (empty? queue)
    (assertion-violation 'getq "Queue is empty")))

When I run the code (which I have checked with the answer given in the
book), I am presented with the following output: "In procedure module-
lookup: Unbound variable: assertion-violation."

So far I have found no pointers to a solution in the reference manual
or on the web.  My assumption is that I am missing a module or library
from somewhere, but don't know how to set about identifying it. Chicken
Scheme also responds with the same error.

Guile version 2.0.13 on Debian Stretch 4.9.0-3-amd64.

Any suggestions please? Thanks in anticipation,

Peter Silcock







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

* Re: Request for assistance: (assertion-violation) unbound variable
       [not found] ` <CABPkNKk9Nm2GQ9=Su-B8jKrNsAwcow5FRqwOcz4dcCKQ3c7ELQ@mail.gmail.com>
@ 2017-06-08 11:40   ` Peter Silcock
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Silcock @ 2017-06-08 11:40 UTC (permalink / raw)
  To: Guile Mailing List

Many thanks for your assistance.

Peter.



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

* Re: Request for assistance: (assertion-violation) unbound variable
  2017-06-08 10:28 Request for assistance: (assertion-violation) unbound variable Peter Silcock
       [not found] ` <CABPkNKk9Nm2GQ9=Su-B8jKrNsAwcow5FRqwOcz4dcCKQ3c7ELQ@mail.gmail.com>
@ 2017-06-11  6:23 ` Alex Vong
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Vong @ 2017-06-11  6:23 UTC (permalink / raw)
  To: Peter Silcock; +Cc: Guile Mailing List

[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]

Peter Silcock <peter@fastmail.uk> writes:

> As a newcomer to Guile/Scheme, I am working my way through some
> exercises which require the use of an (assertion-violation) procedure
> to trap an error condition, specifically:
>
> (if (empty? queue)
>     (assertion-violation 'getq "Queue is empty")))
>
> When I run the code (which I have checked with the answer given in the
> book), I am presented with the following output: "In procedure module-
> lookup: Unbound variable: assertion-violation."
>
> So far I have found no pointers to a solution in the reference manual
> or on the web.  My assumption is that I am missing a module or library
> from somewhere, but don't know how to set about identifying it. Chicken
> Scheme also responds with the same error.
>
> Guile version 2.0.13 on Debian Stretch 4.9.0-3-amd64.
>
> Any suggestions please? Thanks in anticipation,
>
> Peter Silcock

I think you have to import the r6rs base library:

  (use-modules (rnrs base))

Welcome to guile!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2017-06-11  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-08 10:28 Request for assistance: (assertion-violation) unbound variable Peter Silcock
     [not found] ` <CABPkNKk9Nm2GQ9=Su-B8jKrNsAwcow5FRqwOcz4dcCKQ3c7ELQ@mail.gmail.com>
2017-06-08 11:40   ` Peter Silcock
2017-06-11  6:23 ` Alex Vong

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).