3 ;;; Mes --- Maxwell Equations of Software
4 ;;; Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
6 ;;; This file is part of Mes.
8 ;;; Mes is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; Mes is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with Mes. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (mes guile)
49 ;;#:re-export (open-input-file open-input-string with-input-from-string)
54 (define pmatch-car car)
55 (define pmatch-cdr cdr)
56 (define core:exit exit)
57 (define core:display display)
58 (define core:display-port display)
59 (define (core:display-error o) (display o (current-error-port)))
60 (define core:write write)
61 (define (core:write-error o) (write o (current-error-port)))
62 (define core:write-port write)
63 (define core:macro-expand identity)
64 (define (core:apply f a . m) (apply f a))
65 (define append2 append)
67 (define guile:keyword? keyword?)
68 (define guile:number? number?)
69 (define guile:pair? pair?)
70 (define guile:string? string?)
71 (define guile:symbol? symbol?)
73 (define <cell:char> 0)
74 (define <cell:keyword> 4)
75 (define <cell:number> 6)
76 (define <cell:pair> 7)
77 (define <cell:string> 10)
78 (define <cell:symbol> 11)
79 (define <cell:vector> 15)
82 (cond ((guile:keyword? x) <cell:keyword>)
83 ((guile:number? x) <cell:number>)
84 ((guile:pair? x) <cell:pair>)
85 ((guile:string? x) <cell:string>)
86 ((guile:symbol? x) <cell:symbol>))))
94 (use-modules (ice-9 syncase))
95 (define (compose proc . rest)
98 (proc (apply (apply compose rest) args)))))