Guile, by default, only recognizes a keyword syntax that is compatible
with R5RS. A token of the form
NAME has the
same syntax as a Scheme symbol (see Symbol Read Syntax), is the
external representation of the keyword named
objects print using this syntax as well, so values containing keyword
objects can be read back into Guile. When used in an expression,
keywords are self-quoting objects.
keywords read option is set to
'prefix, Guile also
recognizes the alternative read syntax
:NAME. Otherwise, tokens
of the form
:NAME are read as symbols, as required by R5RS.
keyword read option is set to
recognizes the SRFI-88 read syntax
NAME: (see SRFI-88).
Otherwise, tokens of this form are read as symbols.
To enable and disable the alternative non-R5RS keyword syntax, you use
read-set! procedure documented Scheme Read. Note that
postfix syntax are mutually exclusive.
(read-set! keywords 'prefix) #:type ⇒ #:type :type ⇒ #:type (read-set! keywords 'postfix) type: ⇒ #:type :type ⇒ :type (read-set! keywords #f) #:type ⇒ #:type :type -| ERROR: In expression :type: ERROR: Unbound variable: :type ABORT: (unbound-variable)