Re: [Chicken-users] Summer 2012 meetup in the UK?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have now migrated the above email, and the results from the Doodle, into the wiki: http://wiki.call-cc.org/event/chicken-uk-2012 Please update the table with your requirements and needs if you're coming! ABS - -- Alaric Snell-Pym http://www.snell-pym.org.uk/alaric/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9XRHIACgkQRgz/WHNxCGqy4QCff1cHdsfZ/Kl11jvq9ChnGaHh /AUAnRSvcx+soBOD1NPTPa2HAWWop6uN =qXir -END PGP SIGNATURE- ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] cannot import from undefined module
I'm trying to put some functions into a module, but I'm having difficulties. Everything seems to work when I use csi - putting it into a module causes errors. Here's the specific errors I am encountering: Warning: reference to possibly unbound identifier `read-lines' in: Warning:rep-read-file-lines Warning: reference to possibly unbound identifier `call-with-input- string' in: Warning:rep-read-string I think it has got something to do with the fact that the functions are visible in the namespace used by csi, but not when I create a module. If I try to import srfi-6 in my module, like so: (module mccsl ( define-simple-syntax) (import scheme chicken) (import srfi-6) ... ) I get the compilation error Syntax error (import): cannot import from undefined module What do I do to fix this? It's all proving to be an uphill battle. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] cannot import from undefined module
Hi Mark, * Mark Carter mcar...@markcarter.me.uk [120307 14:03]: If I try to import srfi-6 in my module, like so: (module mccsl ( define-simple-syntax) (import scheme chicken) (import srfi-6) ... ) I get the compilation error Syntax error (import): cannot import from undefined module What do I do to fix this? It's all proving to be an uphill battle. There is no module called srfi-6. The list of available modules that are included in chicken-core is described in the manual: http://api.call-cc.org/doc/chicken/language all extensions have to be installed with chicken-install and loaded with (use) or (require-extension). A list of it is available http://wiki.call-cc.org/eggs or searchable here: http://api.call-cc.org/doc/ string ports are available throught the ports unit: http://api.call-cc.org/doc/ports HTH, Christian -- Who can (make) the muddy water (clear)? Let it be still, and it will gradually become clear. Who can secure the condition of rest? Let movement go on, and the condition of rest will gradually arise. -- Lao Tse. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] cannot import from undefined module
On Wed, Mar 07, 2012 at 01:03:41PM +, Mark Carter wrote: If I try to import srfi-6 in my module, like so: (module mccsl ( define-simple-syntax) (import scheme chicken) (import srfi-6) ... ) I get the compilation error Syntax error (import): cannot import from undefined module That's because (import ...) only loads the import library. Chicken is a compiler which uses separate compilation, which means we also support cross-compilation. To get all this to work properly, the import libraries are separated from the actual libraries. The import library only contains macro stuff and information about available symbols. To load the library itself, you should use the USE clause: (module mccsl (define-simple-syntax) (import chicken scheme) (use srfi-6) ...) What do I do to fix this? It's all proving to be an uphill battle. We'd appreciate if you could provide hints about how to improve the documentation. This is often a problem for newbies, so we should really try and fix this. Cheers, Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] cannot import from undefined module
* Christian Kellermann ck...@pestilenz.org [120307 14:10]: Hi Mark, * Mark Carter mcar...@markcarter.me.uk [120307 14:03]: If I try to import srfi-6 in my module, like so: (module mccsl ( define-simple-syntax) (import scheme chicken) (import srfi-6) ... ) I get the compilation error Syntax error (import): cannot import from undefined module What do I do to fix this? It's all proving to be an uphill battle. There is no module called srfi-6. The list of available modules that are included in chicken-core is described in the manual: http://api.call-cc.org/doc/chicken/language all extensions have to be installed with chicken-install and loaded with (use) or (require-extension). A list of it is available http://wiki.call-cc.org/eggs or searchable here: http://api.call-cc.org/doc/ string ports are available throught the ports unit: http://api.call-cc.org/doc/ports Heh seems there might be a confusion on my side. open-output-string, get-output-string and get-output-string are defined in the library unit, which is available by default. If you need more convenient procedures please have a look at the ports unit. Now while having a look at this I see that one can (use srfi-6) without error because it is mapped to an internal already available module, while (import srfi-6) does not. This seems to be a bug. Thanks for noticing this! Which information would you've liked to have before stumbling on all of this? Maybe that would be a good place to start the improvements, apart from the bug fixing... Sorry for the inconveniences, Christian -- Who can (make) the muddy water (clear)? Let it be still, and it will gradually become clear. Who can secure the condition of rest? Let movement go on, and the condition of rest will gradually arise. -- Lao Tse. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] cannot import from undefined module
Christian Kellermann ck...@pestilenz.org Thanks for noticing this! I'm not sure if I in some way corrupted my install of chicken, but I removed the Debian version of chicken and obtained 4.7.0.5-st.tar.gz from http://wiki.call-cc.org/stability That seems to have fixed my issues. Phew. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Fwd: Re: cannot import from undefined module
---BeginMessage--- Christian Kellermann ck...@pestilenz.org Which information would you've liked to have before stumbling on all of this? Maybe that would be a good place to start the improvements, It's difficult to say. I'm in no way saying it's the document's fault, but as a newbie to scheme, things can get a little overwhelming on the infrastructure side. There are so many ways to slice and dice modules, with import, use, require-extension and so on, that a newbie like me is often overwhelmed. Recipe-type approaches certainly help. One thing that is confusing is at: http://wiki.call-cc.org/man/4/Extensions What's the difference between a module and a library? I get the impression that libraries don't have localised namespaces, can't export macros, and are perhaps suitable for linking with C; whereas modules are the opposite. Is that right? ---End Message--- ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Fwd: Re: cannot import from undefined module
Mark Carter scripsit: What's the difference between a module and a library? I get the impression that libraries don't have localised namespaces, can't export macros, and are perhaps suitable for linking with C; whereas modules are the opposite. Is that right? A module is a syntax form that packages up definitions (and possibly expressions), controls which names are exported from it, and specifies which names from which other modules are imported into it. An extension library, or egg, is a packaging device that delivers one or more modules in a form that can be loaded into a program (including the interpreter) and imported. Commonly a library has only one module, but this is not a requirement. -- I now introduce Professor Smullyan, John Cowan who will prove to you that either co...@ccil.org he doesn't exist or you don't exist,http://www.ccil.org/~cowan but you won't know which. --Melvin Fitting ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users