tiancaiamao / shen-go

A Go implementation of the Shen programming language
Other
55 stars 4 forks source link

S31: add the new S31 series kernel code #29

Closed tiancaiamao closed 2 years ago

tiancaiamao commented 2 years ago

Add the latest code from http://shenlanguage.org/download.html

cd S31/Test\ Programs/
~/go/bin/kl
(load-file "../KLambda/sys.kl")
(load-file "../KLambda/writer.kl")
(load-file "../KLambda/core.kl")
(load-file "../KLambda/reader.kl")
(load-file "../KLambda/declarations.kl")
(load-file "../KLambda/toplevel.kl")
(load-file "../KLambda/macros.kl")
(load-file "../KLambda/load.kl" )
(load-file "../KLambda/prolog.kl")
(load-file "../KLambda/sequent.kl")
(load-file "../KLambda/track.kl")
(load-file "../KLambda/t-star.kl")
(load-file "../KLambda/yacc.kl")
(load-file "../KLambda/types.kl")
(shen.shen)
(load "runme.shen")

Note, the file macro.shen function defmacro-macro

(/. X (F X)) is changed to (fn F), because in the shen-go port, it distinguish a symbol from a function:

((let F myf
        Def (eval [define myf X -> X])
        (/. X (F X)))
42)

See also https://groups.google.com/g/qilang/c/DySnw7zPscA

There are still some test cases failed, I'll figure out why.