modules disappears pasted by klm` on Wed Sep 17 11:25:42 2014


;; how can I keep modules after compilation?


[klm@kth tmp]$ csi -s ./module-disappears.scm 
foobar is12
#;1> foobar
12
#;1> (import foo)
#;1> foobar
12

## all good!
## but compiled, foo and foobar disappears:

[klm@kth tmp]$ csc -O0  ./module-disappears.scm  && ./module-disappears 
foobar is 12
#;> foobar

Error: unbound variable: foobar
#;> (import foo)

Error: (import) during expansion of (import ...) - cannot import from undefined module: foo

	Call history:

	<syntax>	  (import foo)	<--




this seems to work added by klm` on Wed Sep 17 15:17:02 2014

;; according to sjamaan, modules are removed by design. we have to emit them and deploy their .import.scm files.

;; adding -J to csc gives us many *.import.scm files
(compile -O0 cube-server-program.scm -o cube-server -J)

;; get these in the deploy directory
;; I want to copy .import files so that (import turi notify) will work
;; from compiled code.
(install-extension 'cube-server ;; <-- what?
                   (glob "*.import.scm"))