guile-user
[Top][All Lists]
Advanced

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

Re: Request for assistance: (assertion-violation) unbound variable


From: Alex Vong
Subject: Re: Request for assistance: (assertion-violation) unbound variable
Date: Sun, 11 Jun 2017 14:23:09 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Peter Silcock <address@hidden> 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: signature.asc
Description: PGP signature


reply via email to

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