@@ -20,6 +20,12 @@ Make sure you have [Go installed](https://golang.org/doc/install).
2020make shen
2121```
2222
23+ or for windows
24+
25+ ```
26+ make shen-exe
27+ ```
28+
2329## Running
2430
2531```
@@ -40,23 +46,9 @@ make test
4046
4147```
4248make kl
43- cd 'S31 /Test Programs'
49+ cd 'S39 /Test Programs'
4450kl
45- (load-file "../KLambda/toplevel.kl")
46- (load-file "../KLambda/core.kl")
47- (load-file "../KLambda/sys.kl")
48- (load-file "../KLambda/sequent.kl")
49- (load-file "../KLambda/yacc.kl")
50- (load-file "../KLambda/reader.kl")
51- (load-file "../KLambda/prolog.kl")
52- (load-file "../KLambda/track.kl")
53- (load-file "../KLambda/load.kl")
54- (load-file "../KLambda/writer.kl")
55- (load-file "../KLambda/macros.kl")
56- (load-file "../KLambda/declarations.kl")
57- (load-file "../KLambda/t-star.kl")
58- (load-file "../KLambda/types.kl")
59- (shen.shen)
51+ (load-file "../../cmd/kl/runtests.kl")
6052(load "runme.shen")
6153```
6254
6557
6658```
6759make shen
68- cd 'S31 /Test Programs'
60+ cd 'S39 /Test Programs'
6961../../shen
7062(load "runme.shen")
7163```
7264
7365## How to bootstrap
7466
67+ You can just do
68+ ```
69+ cd compiled
70+ kl
71+ (load-file "script.kl")
72+ (load "compile-to-go.shen")
73+ (load "bctogo.shen")
74+ cd ..
75+ make shen
76+ ```
77+ Explanation :
78+
7579` kl ` implement a simple klambda interpreter in Go, which can be used to bootstrap ` shen `
7680
7781```
7882;; mkdir -p compiled
7983;; cd compiled
8084;; kl
81- (load-file "../S31 /KLambda/toplevel.kl")
82- (load-file "../S31 /KLambda/core.kl")
83- (load-file "../S31 /KLambda/sys.kl")
84- (load-file "../S31 /KLambda/sequent.kl")
85- (load-file "../S31 /KLambda/yacc.kl")
86- (load-file "../S31 /KLambda/reader.kl")
87- (load-file "../S31 /KLambda/prolog.kl")
88- (load-file "../S31 /KLambda/track.kl")
89- (load-file "../S31 /KLambda/load.kl")
90- (load-file "../S31 /KLambda/writer.kl")
91- (load-file "../S31 /KLambda/macros.kl")
92- (load-file "../S31 /KLambda/declarations.kl")
93- (load-file "../S31 /KLambda/t-star.kl")
94- (load-file "../S31 /KLambda/types.kl")
85+ (load-file "../S39 /KLambda/toplevel.kl")
86+ (load-file "../S39 /KLambda/core.kl")
87+ (load-file "../S39 /KLambda/sys.kl")
88+ (load-file "../S39 /KLambda/sequent.kl")
89+ (load-file "../S39 /KLambda/yacc.kl")
90+ (load-file "../S39 /KLambda/reader.kl")
91+ (load-file "../S39 /KLambda/prolog.kl")
92+ (load-file "../S39 /KLambda/track.kl")
93+ (load-file "../S39 /KLambda/load.kl")
94+ (load-file "../S39 /KLambda/writer.kl")
95+ (load-file "../S39 /KLambda/macros.kl")
96+ (load-file "../S39 /KLambda/declarations.kl")
97+ (load-file "../S39 /KLambda/t-star.kl")
98+ (load-file "../S39 /KLambda/types.kl")
9599(shen.shen)
96100```
97101
@@ -107,20 +111,20 @@ Compile the klambda to the intermediate representation:
107111
108112```
109113(set *maximum-print-sequence-size* 100000)
110- (compile-file "../S31 /KLambda/sys.kl" "sys.tmp")
111- (compile-file "../S31 /KLambda/writer.kl" "writer.tmp")
112- (compile-file "../S31 /KLambda/core.kl" "core.tmp")
113- (compile-file "../S31 /KLambda/reader.kl" "reader.tmp")
114- (compile-file "../S31 /KLambda/declarations.kl" "declarations.tmp")
115- (compile-file "../S31 /KLambda/toplevel.kl" "toplevel.tmp")
116- (compile-file "../S31 /KLambda/macros.kl" "macros.tmp")
117- (compile-file "../S31 /KLambda/load.kl" "load.tmp")
118- (compile-file "../S31 /KLambda/prolog.kl" "prolog.tmp")
119- (compile-file "../S31 /KLambda/sequent.kl" "sequent.tmp")
120- (compile-file "../S31 /KLambda/track.kl" "track.tmp")
121- (compile-file "../S31 /KLambda/t-star.kl" "t-star.tmp")
122- (compile-file "../S31 /KLambda/yacc.kl" "yacc.tmp")
123- (compile-file "../S31 /KLambda/types.kl" "types.tmp")
114+ (compile-file "../S39 /KLambda/sys.kl" "sys.tmp")
115+ (compile-file "../S39 /KLambda/writer.kl" "writer.tmp")
116+ (compile-file "../S39 /KLambda/core.kl" "core.tmp")
117+ (compile-file "../S39 /KLambda/reader.kl" "reader.tmp")
118+ (compile-file "../S39 /KLambda/declarations.kl" "declarations.tmp")
119+ (compile-file "../S39 /KLambda/toplevel.kl" "toplevel.tmp")
120+ (compile-file "../S39 /KLambda/macros.kl" "macros.tmp")
121+ (compile-file "../S39 /KLambda/load.kl" "load.tmp")
122+ (compile-file "../S39 /KLambda/prolog.kl" "prolog.tmp")
123+ (compile-file "../S39 /KLambda/sequent.kl" "sequent.tmp")
124+ (compile-file "../S39 /KLambda/track.kl" "track.tmp")
125+ (compile-file "../S39 /KLambda/t-star.kl" "t-star.tmp")
126+ (compile-file "../S39 /KLambda/yacc.kl" "yacc.tmp")
127+ (compile-file "../S39 /KLambda/types.kl" "types.tmp")
124128```
125129
126130And generate the Go files from the intermediate representation:
0 commit comments