3 export GUILE_AUTO_COMPILE=${GUILE_AUTO_COMPILE-0}
4 exec ${GUILE-guile} -L $(pwd)/guile -e '(mescc)' -s "$0" "$@"
7 ;;; Mes --- The Maxwell Equations of Software
8 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
10 ;;; This file is part of GNU Guix.
12 ;;; Mes is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; Mes is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with Mes. If not, see <http://www.gnu.org/licenses/>.
25 ;; The Maxwell Equations of Software -- John McCarthy page 13
26 ;; http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
30 GUILE='~/src/guile-1.8/build/pre-inst-guile --debug -q' guile/mescc.scm
33 (define-module (mescc)
34 #:use-module (language c99 compiler)
35 #:use-module (ice-9 rdelim)
36 #:use-module (ice-9 pretty-print)
39 (define (main arguments)
40 (let* ((files (cdr arguments))
41 (file (if (null? files) "doc/examples/main.c"
43 (with-input-from-file file