unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: guile-devel@gnu.org
Subject: Trouble using (current-filename)
Date: Tue, 14 Feb 2012 13:57:04 -0500	[thread overview]
Message-ID: <87d39h451b.fsf@netris.org> (raw)

I put the following test module in my load path:

  (define-module (current-filename-fail)
    :export (my-filename))
  (define my-filename (current-filename))
  (define (force-a-warning-message) (identity 1 2 3))

And this is what I see with Guile 2.0.5:

  GNU Guile 2.0.5
  Copyright (C) 1995-2012 Free Software Foundation, Inc.
  
  Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
  This program is free software, and you are welcome to redistribute it
  under certain conditions; type `,show c' for details.
  
  Enter `,help' for help.
  scheme@(guile-user)> ,use (current-filename-fail)
  ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
  ;;;       or pass the --no-auto-compile argument to disable.
  ;;; compiling /home/mhw/guile-modules/current-filename-fail.scm
  ;;; current-filename-fail.scm:4:34: warning: possibly wrong number of arguments to `identity'
  ;;; compiled /home/mhw/.cache/guile/ccache/2.0-LE-4-2.0/home/mhw/guile-modules/current-filename-fail.scm.go
  scheme@(guile-user)> my-filename
  $1 = #f

The (force-a-warning-message) line shows that source information is
available.  The same thing happens if I remove that line, or if I try
with stable-2.0.

What am I doing wrong?

    Thanks,
      Mark



             reply	other threads:[~2012-02-14 18:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14 18:57 Mark H Weaver [this message]
2012-02-15 22:23 ` Trouble using (current-filename) Andy Wingo
2012-02-16 21:34   ` Ludovic Courtès
2012-02-16 22:25     ` Andy Wingo
2012-02-17 22:49       ` Ludovic Courtès
2012-02-18 20:58         ` Andy Wingo
2012-02-19 14:10           ` Ludovic Courtès
2012-02-19 20:44             ` Andy Wingo
2012-02-19 21:02               ` Ludovic Courtès
2012-02-19 21:23                 ` Andy Wingo
2012-02-19 21:30                   ` Noah Lavine
2012-02-20 13:12                     ` Ludovic Courtès
2012-02-21 20:48             ` Neil Jerram
2012-02-21 20:52               ` Ludovic Courtès
2012-02-21 21:00                 ` Neil Jerram
2012-03-15  2:00                   ` Noah Lavine
2012-03-15  8:34                     ` Neil Jerram
2012-03-15 16:41                       ` Ludovic Courtès
2012-03-15 21:31                         ` Andy Wingo
2012-03-21 21:11                           ` Ludovic Courtès
2012-02-21 17:38   ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d39h451b.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).