Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
BostX committed Apr 19, 2024
1 parent 26124e0 commit 02c9667
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions notes/guix-guile-nix/guile.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@
}

@block{@block-name{Various code snippets}
;; use-modules Syntax:
(use-modules (MODULE-NAME [#:select SELECTION]
[#:prefix PREFIX]
[#:renamer RENAMER]
;; R6RS-compatible version reference
[#:version VERSION-SPEC]))
;; example
(use-modules ((ice-9 popen)
#:select ((open-pipe . pipe-open) close-pipe)
#:renamer (symbol-prefix-proc 'unixy:)))

;; rename & export
(define-module (my-module)
#:export ((old-name . new-name)))
(define old-name 42)

;; try-catch
;; See https://vijaymarupudi.com/blog/2022-02-13-error-handling-in-guile.html
(begin
Expand Down

0 comments on commit 02c9667

Please sign in to comment.