move scm srfi files to module/srfi, and compile them.
[bpt/guile.git] / module / srfi / srfi-88.scm
1 ;;; srfi-88.scm --- Keyword Objects
2
3 ;; Copyright (C) 2008 Free Software Foundation, Inc.
4 ;;
5 ;; This library is free software; you can redistribute it and/or
6 ;; modify it under the terms of the GNU Lesser General Public
7 ;; License as published by the Free Software Foundation; either
8 ;; version 2.1 of the License, or (at your option) any later version.
9 ;;
10 ;; This library is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ;; Lesser General Public License for more details.
14 ;;
15 ;; You should have received a copy of the GNU Lesser General Public
16 ;; License along with this library; if not, write to the Free Software
17 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19 ;;; Author: Ludovic Courtès <ludo@gnu.org>
20
21 ;;; Commentary:
22
23 ;; This is a convenience module providing SRFI-88 "keyword object". All it
24 ;; does is setup the right reader option and export keyword-related
25 ;; convenience procedures.
26
27 ;;; Code:
28
29 (define-module (srfi srfi-88)
30 #:re-export (keyword?)
31 #:export (keyword->string string->keyword))
32
33 (cond-expand-provide (current-module) '(srfi-88))
34
35 \f
36 (read-set! keywords 'postfix)
37
38 (define (keyword->string k)
39 "Return the name of @var{k} as a string."
40 (symbol->string (keyword->symbol k)))
41
42 (define (string->keyword s)
43 "Return the keyword object whose name is @var{s}."
44 (symbol->keyword (string->symbol s)))
45
46 ;;; Local Variables:
47 ;;; coding: latin-1
48 ;;; End:
49
50 ;;; srfi-88.scm ends here