unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Dmitry Bogatov <KAction@gnu.org>
To: guile-user <guile-user@gnu.org>
Subject: Feature request: pretty print error message
Date: Sun, 12 Oct 2014 01:09:32 +0400	[thread overview]
Message-ID: <20141011210932.GA8630@self.lan> (raw)

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

Subj.

I believe Guile have two problems:

-- error messages rarely mention, where real problem is
-- they are also completely unreadable.

Maybe situation with second can be improved, using (ice-9 pretty-print)?

If I can plug it in, please tell me how, if I can't,
maybe someone could make it possible?

Offtopic: Is it any way to write macros to hell not break loose, if
 I use it wrong?

Just encountered, just to illustrate my vision of problem.

ice-9/psyntax.scm:2549:53: In procedure #<procedure 25646c0 (val key m)>:
ice-9/psyntax.scm:2549:53: Syntax error:
/home/kaction/devel/guile-bash/lisp/system/ffi.scm:297:2: syntax-case: invalid clause in form ((_ name (arg-clause ... -> ret)) (check-name (syntax name)) (with-syntax ((encoder (fmap pointer/encoder-name (syntax name))) (decoder (fmap pointer/decoder-name (syntax name))) (clauses (syntax (arg-clause ...))) ((a/name ...) (s-map clause/name clauses)) ((a/type ...) (s-map clause/type clauses)) ((d/name ...) (s-map clause/name (s-filter (lambda (x) (or (clause/const? x) (clause/normal? x))) clauses))) ((d/arg ...) (s-map clause/d/arg clauses)) (((prov/name . prov/type) ...) (s-map (lambda (x) (s-cons (clause/name x) (clause/type x))) (s-filter clause/provide? clauses))))) (syntax (begin (define encoder #f) (define decoder #f) (match ret (($ ret-decoder ret-encoder ret-type ret-size) (set! encoder (lambda (fn) (procedure->pointer ret-type (lambda (a/name ...) (ret-encoder (fn ((ffi-object-decoder a/type) a/name) ...))) (list a/type ...)))) (set! decoder (lambda (ptr) (define raw-proc (pointer->procedure ret-type ptr (list a/type ...))) (lambda (d/name ...) (with-provided-memory ((prov/type prov/name) ...) (define <ret> (ret-decoder (raw-proc d/arg ...))) (let ((provided ((list prov/name ...)))) (if (null? provided) <ret> (cons <ret> provided))))))))) (define-ffi-object name #:encoder encoder #:decoder decoder #:size (sizeof (quote *))))))

--
Best regards, Dmitry Bogatov <KAction@gnu.org>,
Free Software supporter, esperantisto and netiquette guardian.
GPG: 54B7F00D

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

                 reply	other threads:[~2014-10-11 21:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20141011210932.GA8630@self.lan \
    --to=kaction@gnu.org \
    --cc=guile-user@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).