id summary reporter owner description type status priority milestone component version resolution keywords cc difficulty 1359 mbox-string's mbox-file->messages does not obviously match its documentation Norman Gray Ivan Raikov "The documentation in module `mbox` mentions a module `mbox-string` {{{ [procedure] (mbox-file->messages FILENAME-OR-PORT) => MESSAGE LIST Given a filename or port, parses the given file as an mbox database, and returns a list of message objects. The contents of the message are represented as a string. }}} If, however, I use this in the way that this documentation indicates, it seems to produce errors as illustrated below. The paragraph before the discussion of `mbox-file->messages` says 'The procedures in module mbox-string operate on strings.' This seems to contradict the documentation of `mbox-file->messages`, which claims to operate on filename-or-port, as explicitly opposed to a string. Incidentally: I cannot deduce from the documentation how one is supposed to use any of `mbox`, `internet-messages` `abnf` or `typeclass`. Each of the first three points to `typeclass` for more information, but that documentation doesn't say what 'type-class-style' is (it has only one line of description) and provides an example which doesn't actually seem to use the objects it has set up. This discussion might be a little too concise to be useful. The only further information I could google about 'type-class style' was https://groups.google.com/d/topic/comp.lang.scheme/J2-TpYsMhfY , which appears to lead us back where we started. {{{ % csi CHICKEN (c) 2008-2017, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann Version 4.12.0 (rev 6ea24b6) macosx-unix-clang-x86-64 [ 64bit manyargs dload ptables ] compiled 2017-02-19 on yves.more-magic.net (Linux) #;1> (use mbox-string) ; loading /Data/tools/chicken-4.12/lib/chicken/8/mbox-string.import.so ... ; loading /Data/tools/chicken-4.12/lib/chicken/8/chicken.import.so ... ;;; [...] ; loading /Data/tools/chicken-4.12/lib/chicken/8/mbox.so ... #;2> (define text (with-input-from-file ""test.mbox"" read-string)) #;3> text ""From user@somewhere\nReceived: from [12.34.56.78] (nowhere.example.org [12.34.56.78])\n by 0.0.0.0:587 (trex/5.7.12);\n Mon, 03 Apr 2017 10:16:04 -0400\nFrom: Test User \nTo: someone@example.org\nSubject: Nothing much\nDate: Mon, 03 Apr 2017 15:16:02 +0100\n\nThis is a message for reading.\nIt's quite simple.\n\nAnd on multiple lines.\n"" #;4> (call-with-input-string text mbox-file->messages) Error: call of non-procedure: # Call history: (call-with-input-string text mbox-file->messages) (call-with-input-string text mbox-file->messages) <-- #;4> (call-with-input-file ""test.mbox"" mbox-file->messages) Error: call of non-procedure: # Call history: (call-with-input-file ""test.mbox"" mbox-file->messages) (call-with-input-file ""test.mbox"" mbox-file->messages) <-- #;4> (mbox-file->messages ""test.mbox"") Error: call of non-procedure: # Call history: (mbox-file->messages ""test.mbox"") (mbox-file->messages ""test.mbox"") <-- #;4> }}}" defect closed major someday unknown 4.12.0 fixed mbox typeclass