Hey!
I'm struggling using conditional expand with guile hoot. E.g., I want to have a "message" function display stuff either to terminal (when called there) or to a HTML element (when called in wasm).
I tried something like:
(cond-expand (hoot
(define-module (ui ui) #:use-module (web dom) #:export (message))) (else (define-module (ui ui) #:export (message)))) (cond-expand (hoot (define (message msg) "Display a text message" (append-child! (document-body) (make-text-node msg)))) (else (define (message msg) "Display a text message" (display msg) (newline)))) (message "Foo")
This works when called in normal guile, but not when trying to build wasm ("hoot/library-group.scm:604:5: In procedure parse-library:invalid module forms (lot of stuff)")
I'd be really thankful if I could have any pointer on the way to do that cleanly :)
(Thought in any case given the deadline I'm afraid I won't be able to send more than a hello world to this jam 😭 )