I have the following file, called foo.scm: (define-module (koz foo) #:use-module (srfi srfi-9)) (define-public (make-empty-bar) (make-bar #f)) (define-record-type (make-bar open) bar? (open bar-open set-bar-open!)) I then also have this script test-foo.scm in the same directory: #!/usr/bin/guile \ -L .. -s !# (use-modules (koz foo)) (define corner-bar (make-empty-bar)) (display corner-bar) (newline) After chmodding and trying to run test-foo.scm (with autocompilation enabled), I get a pile of error messages. After some testing, I discovered that if the order of definitions in foo.scm is inverted (i.e. the define-record-type comes first), this problem does not occur and the script works fine. However, the errors received are extremely unhelpful: Backtrace: In ice-9/boot-9.scm: 157: 8 [catch #t # ...] In unknown file: ?: 7 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 6 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 5 [eval # #] In ice-9/boot-9.scm: 2401: 4 [save-module-excursion #] 4052: 3 [#] In unknown file: ?: 2 [load-compiled/vm "/home/koz/.cache/guile/ccache/2.0-LE-8-2.0/home/koz/documents/programming/guile/koz/foo-test.scm.go"] In /home/koz/documents/programming/guile/koz/./foo-test.scm: 7: 1 [#] In unknown file: ?: 0 [# #f 6 #f] ERROR: In procedure #: ERROR: Wrong type to apply: # Would it be possible for the error message in this case to be a bit more helpful? Even better, would it be possible to not make this an issue when compiling? -- Koz Ross www.retro-freedom.nz If you aren't using GPG, you should be! https://emailselfdefense.fsf.org/en. *** Please don't send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html for why. *** Proud member of the Open Wireless Movement. Find out more at https://openwireless.org/