unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* debugging scheme module
@ 2006-12-07  9:20 Al Nikolov
  2006-12-07 12:54 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Al Nikolov @ 2006-12-07  9:20 UTC (permalink / raw)


Hello, all!

I'm totally newbie in Guile and R5RS, faced to write a scheme module for an
application written with Guile.

When i do just another wierd mistake and run the app, i usually get
uncomprehensive error messages like:

Fatal error: [library-name] wrong-type-arg: ("caddar" "Wrong type argument
in position ~A: ~S" (1 ()) #f)

Since my scheme code is bigger than two parenthesis and three lines, i
feel myself totally embarassed by having absolutely no idea where to look
for the trouble and what those "~A"s and "#f"s mean.

Could anybody be so kind to give me directions to fight my ignorance?

-- 
Regards,
Al Nikolov       jid: alnikolov@jabber.ru irc: clown uin: 312108671
pgp fingerprint: 4B50 F1E3 080C 21A2 91F4  8BF0 CD60 3B5A 2ECF 984B


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: debugging scheme module
  2006-12-07  9:20 debugging scheme module Al Nikolov
@ 2006-12-07 12:54 ` Ludovic Courtès
  2006-12-12 21:36   ` Neil Jerram
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2006-12-07 12:54 UTC (permalink / raw)
  Cc: guile-user

Hi,

Al Nikolov <al@iac.spb.ru> writes:

> Fatal error: [library-name] wrong-type-arg: ("caddar" "Wrong type argument
> in position ~A: ~S" (1 ()) #f)

This means that at some point, `caddar' is invoked and is passed `#f'
instead of a list.  :-)

> Since my scheme code is bigger than two parenthesis and three lines, i
> feel myself totally embarassed by having absolutely no idea where to look
> for the trouble and what those "~A"s and "#f"s mean.

You could try the following:

  (read-enable 'debug)
  (debug-enable 'debug)

This has to be done early enough, ideally when Guile starts up (or when
your first Scheme file gets read).  If you use 1.8, then it should show
a complete backtrace instead of just an error line.

Alternatively, you can run `guile' with the `--debug' option (if that is
an option for you).

Hope this helps,
Ludovic.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: debugging scheme module
  2006-12-07 12:54 ` Ludovic Courtès
@ 2006-12-12 21:36   ` Neil Jerram
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2006-12-12 21:36 UTC (permalink / raw)
  Cc: guile-user

ludovic.courtes@laas.fr (Ludovic Courtès) writes:

> You could try the following:
>
>   (read-enable 'debug)
>   (debug-enable 'debug)

I believe that should be:

   (read-enable 'positions)
   (debug-enable 'debug)
   (debug-enable 'backtrace)

Regards,
     Neil



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

end of thread, other threads:[~2006-12-12 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07  9:20 debugging scheme module Al Nikolov
2006-12-07 12:54 ` Ludovic Courtès
2006-12-12 21:36   ` Neil Jerram

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