-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsi.scm
More file actions
33 lines (24 loc) · 667 Bytes
/
si.scm
File metadata and controls
33 lines (24 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;;;; a simple BONES REPL
(program
(provide check)
(include "base.scm")
(include "eval.scm")
(files "version.scm"
"pp.scm")
(code
(eval-trace #t)
(repl-print pp)
(catch-interrupt)
(let ((bootfile
(or (get-environment-variable "SI_BOOT_FILE")
(file-exists? "/etc/si-boot.scm"))))
(when bootfile (load bootfile)))
(let ((args (cdr (command-line))))
(cond ((null? args)
(cond ((get-environment-variable "HOME") =>
(lambda (home)
(let ((rcfile (file-exists? (string-append home "/.sirc"))))
(when rcfile (load rcfile))))))
(print "(BONES " bones-version ")")
(repl))
(else (load (car args))))) ) )