From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Bogatov Newsgroups: gmane.lisp.guile.user Subject: Feature request: pretty print error message Date: Sun, 12 Oct 2014 01:09:32 +0400 Organization: Church of GNU Message-ID: <20141011210932.GA8630@self.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" X-Trace: ger.gmane.org 1413061877 22304 80.91.229.3 (11 Oct 2014 21:11:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Oct 2014 21:11:17 +0000 (UTC) To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Oct 11 23:11:10 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xd3wU-0004hC-1M for guile-user@m.gmane.org; Sat, 11 Oct 2014 23:11:10 +0200 Original-Received: from localhost ([::1]:55252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xd3wT-00081M-2c for guile-user@m.gmane.org; Sat, 11 Oct 2014 17:11:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xd3wF-00081C-Fi for guile-user@gnu.org; Sat, 11 Oct 2014 17:11:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xd3wA-0002RC-1E for guile-user@gnu.org; Sat, 11 Oct 2014 17:10:55 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xd3w9-0002R6-Tb for guile-user@gnu.org; Sat, 11 Oct 2014 17:10:49 -0400 Original-Received: from [95.211.203.198] (port=33204 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Xd3w9-0004hs-89 for guile-user@gnu.org; Sat, 11 Oct 2014 17:10:49 -0400 Content-Disposition: inline X-Haskell-Quote: IO String contains a String in the same way that /bin/ls contains a list of files X-Perfect-World: There should be one -- and preferably only one -- obvious way to do it. User-Agent: Mutt/1.5.22.1 (2013-10-16) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11576 Archived-At: --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 #: ice-9/psyntax.scm:2549:53: Syntax error: /home/kaction/devel/guile-bash/lisp/system/ffi.scm:297:2: syntax-case: inva= lid clause in form ((_ name (arg-clause ... -> ret)) (check-name (syntax na= me)) (with-syntax ((encoder (fmap pointer/encoder-name (syntax name))) (dec= oder (fmap pointer/decoder-name (syntax name))) (clauses (syntax (arg-claus= e ...))) ((a/name ...) (s-map clause/name clauses)) ((a/type ...) (s-map cl= ause/type clauses)) ((d/name ...) (s-map clause/name (s-filter (lambda (x) = (or (clause/const? x) (clause/normal? x))) clauses))) ((d/arg ...) (s-map c= lause/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 (($ re= t-decoder ret-encoder ret-type ret-size) (set! encoder (lambda (fn) (proced= ure->pointer ret-type (lambda (a/name ...) (ret-encoder (fn ((ffi-object-de= coder a/type) a/name) ...))) (list a/type ...)))) (set! decoder (lambda (pt= r) (define raw-proc (pointer->procedure ret-type ptr (list a/type ...))) (l= ambda (d/name ...) (with-provided-memory ((prov/type prov/name) ...) (defin= e (ret-decoder (raw-proc d/arg ...))) (let ((provided ((list prov/nam= e ...)))) (if (null? provided) (cons provided))))))))) (define-= ffi-object name #:encoder encoder #:decoder decoder #:size (sizeof (quote *= )))))) -- Best regards, Dmitry Bogatov , Free Software supporter, esperantisto and netiquette guardian. GPG: 54B7F00D --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJUOZyMAAoJEHiL4BJUt/ANlXQP/3mPxCd83sssfBQY7R+ns7fu EKAV1MuArIPOFVi2NwcEFFMmp3ebYfUrdmUqVV0xYtettZr1W8vDHqi/smfzqeT0 zP9xUKnmz6ncR5R+6S7PqcPRcc7ZpNP9wI3VgE5mDWrDIBDgwqWAd94U3t2cwHsr YPrALICSEuJa04hIyGT3GnSRhmuVmzfkmBQVuoLJa/9bjCCcBgwzX162cjFrh7ZM eXWerqY3RaDC6KSg8liSy83x9xEC9j00LYeAxXqmcs7ozMm7Vgrxw28ITREFA0f8 6RKdMuQ8zyYc00+WLjKHvRxiFAHeyQCUMjQTDmUUNe0IRltDPmP8DO0GLwYT7l7R KI+PSBp2Wq1L+NmuLbOQGrD8LCkxYsKcOsD8zXRDjHQVWUZUhHys2/1I+KiGQ6td XAPgDx+PqvgyBfv3zgAozL4o6Hw8xroJLmJp+1hTwXEvf47lR9E7Ot3/jLOKeH70 6gZTtFYSSoDOSX/8cfEN/KiWAiiXpZUttHbXePJRcXyXJ+yTm0x1cX5CCvClZBeL +GnoZxTn9DiF1a9T/bcgx652qUCVkpO6IHEKI2GPrmf0b4PQo/k41ra9Jjv4szsv Oeq7IkAlUOKvlKhg8csg1vUSbGMGjPszeDYVqzeFmWlMH5/wKtyA5uT+zg+rHc/h Hu3GfbAZLw6S1pNYUfve =wO1/ -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--