unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Feature request: pretty print error message
@ 2014-10-11 21:09 Dmitry Bogatov
  0 siblings, 0 replies; only message in thread
From: Dmitry Bogatov @ 2014-10-11 21:09 UTC (permalink / raw
  To: guile-user

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-11 21:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-11 21:09 Feature request: pretty print error message Dmitry Bogatov

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