This repository was archived by the owner on Nov 1, 2018. It is now read-only.
forked from haskell-lisp/yale-haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcache-structs.scm
48 lines (43 loc) · 2.22 KB
/
cache-structs.scm
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
;;; these structures deal with the compilation system and the unit cache.
;;; An entry in the unit cache:
(define-struct ucache
(slots
(ufile (type string)) ; the name of the file containing the unit definition
(cifile (type string)) ; the filename of the (compiled) interface file
(sifile (type string)) ; the filename of the (uncompiled) interface file
(cfile (type string)) ; the filename of the (compiled) output file
(sfile (type string)) ; the filename of the (uncompiled) output file
(udate (type integer)) ; the write date of ufile
(idate (type integer)) ; the time stamp of the binary interface file
(stable? (type bool)) ; the stable flag
(load-prelude? (type bool)) ; true if unit uses standard prelude
;; status is initially available (in cache). It is set to loading when
;; requested and loaded once all imported units are loaded.
(status (type (enum loaded loading available)))
(ifile-loaded (type bool)) ; true when interface is loaded (modules)
(code-loaded (type bool)) ; true when the associated code is in memory
(source-files (type (list string))) ; source files in the unit
(imported-units (type (list string))) ; the filenames of imported unit files
(lisp-files (type (list (tuple string string)))) ; source/binary pairs
(modules (type (list module)))
(printers-set? (type bool))
(printers (type (list symbol)))
(optimizers-set? (type bool))
(optimizers (type (list symbol)))
(chunk-size (type (maybe int)))
))
;;; This is used to hold various flags used by the compilation system,
;;; instead of passing them all as individual arguments.
(define-struct cflags
(slots
;; Whether to load code for unit into core
(load-code? (type bool) (default '#t))
;; Whether to create an output code file.
(write-code? (type bool) (default '#t))
;; Affects whether write-code? creates a source or compiled file,
;; and whether load-code? uses the interpreter or compiler.
;; Ignored if load-code? and write-code? are both false.
(compile-code? (type bool) (default '#t))
;; Whether to create an output interface file.
(write-interface? (type bool) (default '#t))
))