Compare commits
6
Commits
main
..
6b723cf91e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b723cf91e | ||
|
|
ea370270f6 | ||
|
|
fa9621542a | ||
|
|
9ed9100373 | ||
|
|
f4b891f241 | ||
|
|
2914774ef5 |
No files matched your search
+4
-16
@@ -1,19 +1,7 @@
|
||||
((haskell-mode
|
||||
. ((eval
|
||||
. (progn (add-to-list 'haskell-font-lock-quasi-quote-modes
|
||||
'("cps" . scheme-mode))
|
||||
(add-to-list 'haskell-font-lock-quasi-quote-modes
|
||||
'("scm" . scheme-mode))))))
|
||||
(haskell-cabal-mode
|
||||
((haskell-cabal-mode
|
||||
. ((eval
|
||||
. (progn (defun apply-cabal-fmt-h ()
|
||||
(haskell-mode-buffer-apply-command "cabal-fmt"))
|
||||
(add-hook 'before-save-hook #'apply-cabal-fmt-h nil t)))))
|
||||
(scheme-mode
|
||||
. ((eval . (dolist (s '(kappa κ prim))
|
||||
(put s 'scheme-indent-function 1)))))
|
||||
(nil
|
||||
. ((eval
|
||||
. (progn (defun display-ansi ()
|
||||
(interactive)
|
||||
(ansi-color-apply-on-region (point-min) (point-max))))))))
|
||||
(add-hook 'before-save-hook #'apply-cabal-fmt-h nil t)
|
||||
(add-to-list 'haskell-font-lock-quasi-quote-modes
|
||||
'("cps" . scheme-mode)))))))
|
||||
@@ -1,3 +1 @@
|
||||
use flake
|
||||
watch_file gyehoek.cabal cabal.project
|
||||
PATH_add $(dirname $(cabal list-bin gyehoek))
|
||||
+1
-2
@@ -8,5 +8,4 @@ dist-newstyle
|
||||
*.tix
|
||||
.direnv
|
||||
result
|
||||
play/
|
||||
trace.html
|
||||
play/
|
||||
@@ -1,3 +1,3 @@
|
||||
# 계획
|
||||
# gyehoek-hs (계획)
|
||||
|
||||
a WIP compiler for R⁷RS Scheme targeting WebAssembly.
|
||||
a (wip) toy compiler for a Scheme-like language. currently targetting [QBE](https://c9x.me/compile/). nabbing from GHC and GNU Guile.
|
||||
@@ -1,10 +1,5 @@
|
||||
packages: *.cabal
|
||||
tests: True
|
||||
-- required for doctest-parallel
|
||||
write-ghc-environment-files: always
|
||||
|
||||
-- https://github.com/martijnbastiaan/doctest-parallel/pull/66
|
||||
allow-older: Cabal:process
|
||||
|
||||
source-repository-package
|
||||
type: git
|
||||
|
||||
@@ -2,59 +2,8 @@
|
||||
|
||||
the closure-conversion phase makes closed-over variables explicit by addition of the primitive ~make-closure~, taking a code pointer (in the CPS language, bare lambda) and the environment.
|
||||
|
||||
nice testable properties of closure-converted code:
|
||||
- code pointers only appear in function position
|
||||
- no function has free variables
|
||||
|
||||
multiple ~env-ref~ calls could probably be replaced with a primitive that loads the entire environment at once, returning multiple variables.
|
||||
|
||||
* scratchpad
|
||||
|
||||
** example
|
||||
|
||||
#+caption: scheme source
|
||||
#+begin_src scheme
|
||||
(letrec ((curried-add (λ (n)
|
||||
(λ (m)
|
||||
(+ n m)))))
|
||||
((curried-add 3) 4))
|
||||
#+end_src
|
||||
|
||||
#+caption: cps
|
||||
#+begin_src scheme
|
||||
(letrec ((curried-add
|
||||
(λ (n ktail0)
|
||||
(letrec ((curried-add-in
|
||||
(λ (m ktail1)
|
||||
(prim (+ n m)
|
||||
(κ (x0) (continue ktail1 x0))))))
|
||||
(continue ktail0 curried-add-in)))))
|
||||
(letrec ((k0 (κ (adder) (adder 4 halt))))
|
||||
(curried-add 3 k0)))
|
||||
#+end_src
|
||||
|
||||
#+caption: closure-converted
|
||||
#+begin_src scheme
|
||||
(letrec ((curried-add
|
||||
(λ (n ktail0)
|
||||
(letrec ((curried-add-in-code
|
||||
(λ (env m ktail1)
|
||||
(prim (env-ref 0 env)
|
||||
(κ (n)
|
||||
(prim (+ n m)
|
||||
(κ (x0) (continue ktail1 x0))))))))
|
||||
(prim (make-closure curried-add-in-code n)
|
||||
(κ (curried-add-in)
|
||||
(continue ktail0 curried-add-in)))))))
|
||||
(letrec ((k0 (κ (adder-closure)
|
||||
(prim (closure-code adder-closure)
|
||||
(κ (adder)
|
||||
(adder adder-closure 4 halt))))))
|
||||
(curried-add 3 k0)))
|
||||
#+end_src
|
||||
|
||||
** wasm
|
||||
|
||||
#+begin_src scheme
|
||||
(letrec ((make-adder
|
||||
(lambda (n)
|
||||
@@ -132,34 +81,3 @@ multiple ~env-ref~ calls could probably be replaced with a primitive that loads
|
||||
$code)
|
||||
1))))
|
||||
#+end_src
|
||||
|
||||
** example
|
||||
|
||||
#+begin_src scheme
|
||||
(λ (n m ktail)
|
||||
(letrec ((f (λ (x ktail-0) (+ x n ktail-0)))
|
||||
(g (λ (y ktail-1) (+ y g ktail-1))))
|
||||
(prim (cons f g) ktail)))
|
||||
#+end_src
|
||||
|
||||
#+begin_src scheme
|
||||
(λ (n m ktail)
|
||||
(letrec ((f-code (λ (x ktail-0)
|
||||
(prim (env-get 2)
|
||||
(κ (n)
|
||||
(+ x n ktail-0)))))
|
||||
(g-code (λ (y ktail-1)
|
||||
(prim (env-get 3)
|
||||
(κ (m)
|
||||
(+ y m ktail-1))))))
|
||||
(letrec ((with-closure-code
|
||||
(κ (f g)
|
||||
(prim (get-env 0)
|
||||
(κ (ktail)
|
||||
(prim cons f g ktail))))))
|
||||
(prim (make-shared-closure (with-closure-code)
|
||||
ktail)
|
||||
(κ (with-closure)
|
||||
(prim (make-shared-closure (f-code g-code) n m)
|
||||
with-closure))))))
|
||||
#+end_src
|
||||
@@ -1,19 +0,0 @@
|
||||
#+title: on libraries
|
||||
|
||||
* libraries and the file system
|
||||
|
||||
R⁷RS leaves it unspecified how exactly libraries correspond to files:
|
||||
|
||||
#+begin_quote
|
||||
Programs and libraries are typically stored in files, although in some implementations they can be entered interactively into a running Scheme system. Other paradigms are possible. Implementations which store libraries in files should document the mapping from the name of a library to its location in the file system.
|
||||
#+end_quote
|
||||
|
||||
thus the implementation of ~define-library~ is open to much interpretation. we could possibly define libraries as first-class objects, or deal with them statically. the former case is appealing to me, as it could massively simplify interactive use.
|
||||
|
||||
* semantics of declaration order
|
||||
|
||||
mercifully, R⁷RS is similarly ambiguous when it comes to the significance of declaration order. the authors note explicitly example two equally acceptable approaches:
|
||||
|
||||
#+begin_quote
|
||||
One possible implementation of libraries is as follows: _After all cond-expand library declarations are expanded, a new environment is constructed for the library consisting of all imported bindings._ The expressions from all begin, include and include-ci library declarations are expanded in that environment in the order in which they occur in the library. _Alternatively, cond-expand and import declarations may be processed in left to right order interspersed with the processing of other declarations_, with the environment growing as imported bindings are added to it by each import declaration.
|
||||
#+end_quote
|
||||
@@ -1,100 +0,0 @@
|
||||
* rationale?
|
||||
|
||||
previously, the VM's stack was used for storing local variables across blocks; a Scheme procedure was split into several low-level routines (one for the procedure itself and one for each continuation), and the stack was used as a communication channel for these separate routines. in contrast, registers were local to each routine. this aligns with Wasm's model of functions pretty well, with Wasm /locals/ acting as the VM's /registers/, and a global mutable stack serving as fallback.
|
||||
|
||||
this worked quite well until it became time to implement ~call/cc~.
|
||||
|
||||
we are considering making the following alterations to the VM:
|
||||
- explicitly segment the stack into frames.
|
||||
- passing procedures and return addresses on the stack.
|
||||
- new instructions:
|
||||
+ ~(tail-call /n/)~
|
||||
+ ~(call /n/)~
|
||||
+ ~(load /r/ /n/)~
|
||||
+ ~(return /n/)~
|
||||
|
||||
* scratchpad
|
||||
|
||||
#+begin_src scheme
|
||||
(letrec ((fac (λ (n)
|
||||
(if (zero? n)
|
||||
1
|
||||
(* n (fac (- n 1)))))))
|
||||
(fac 3))
|
||||
#+end_src
|
||||
|
||||
#+begin_src scheme
|
||||
(λ (ktail0)
|
||||
(letrec ((fac
|
||||
(λ (n ktail1)
|
||||
(zero?
|
||||
n
|
||||
(κ (x0)
|
||||
(if x0
|
||||
(continue ktail1 1)
|
||||
(- n 1
|
||||
(κ (x1)
|
||||
(fac x1
|
||||
(κ (x2)
|
||||
(* n x2 ktail1)))))))))))
|
||||
(fac 3)))
|
||||
#+end_src
|
||||
|
||||
#+begin_example
|
||||
n ktail1
|
||||
| |
|
||||
| | x0
|
||||
| | |
|
||||
| | ^
|
||||
| |
|
||||
| | x1
|
||||
| | |
|
||||
| | ^
|
||||
| |
|
||||
| | x2
|
||||
| | |
|
||||
^ ^ ^
|
||||
#+end_example
|
||||
|
||||
#+begin_src scheme
|
||||
(define $fac-c0
|
||||
(pop! %x0 0) ; [ x0 $fac-c0 n $fac ktail1 ]
|
||||
(if %x0 ; [ $fac-c0 n $fac ktail1 ]
|
||||
;; every variable but `ktail1' is dead so we pop them all.
|
||||
;; this probably means that `if' should take two continuations
|
||||
;; rather than two blocks.
|
||||
(then (push! 1) ; [ $fac-c0 n $fac ktail1 ]
|
||||
(return 1)) ; [ 1 $fac-c0 n $fac ktail1 ]
|
||||
(else (load %n 1) ; [ $fac-c0 n $fac ktail1 ]
|
||||
(prim %x1 (- %n 1)) ; [ $fac-c0 n $fac ktail1 ]
|
||||
(push! $fac-c1) ; [ $fac-c0 n $fac ktail1 ]
|
||||
(push! $fac) ; [ $fac-c1 $fac-c0 n $fac ktail1 ]
|
||||
(push! %x1) ; [ $fac $fac-c1 $fac-c0 n $fac ktail1 ]
|
||||
(call 1) ; [ x1 $fac $fac-c1 $fac-c0 n $fac ktail1 ]
|
||||
)))
|
||||
|
||||
(define $fac-c1
|
||||
(pop! %x2) ; [ x2 $fac-c1 $fac-c0 n $fac ktail1 ]
|
||||
(load %n 3) ; [ $fac-c1 $fac-c0 n $fac ktail1 ]
|
||||
(prim %x3 (* %n %x2))
|
||||
(push! %x3) ; [ $fac-c1 $fac-c0 n $fac ktail1 ]
|
||||
(return 1) ; [ x3 $fac-c1 $fac-c0 n $fac ktail1 ]
|
||||
)
|
||||
|
||||
(define $fac
|
||||
(load %ktail1 2) ; [ n $fac ktail1 ]
|
||||
(load %n 0) ; [ n $fac ktail1 ]
|
||||
(push! $fac-c0) ; [ n $fac ktail1 ]
|
||||
(push! $zero?) ; [ $fac-c0 n $fac ktail1 ]
|
||||
(push! %n) ; [ $zero? $fac-c0 n $fac ktail1 ]
|
||||
(call 1) ; [ n $zero? $fac-c0 n $fac ktail1 ]
|
||||
)
|
||||
|
||||
(define $start
|
||||
(push! $fac) ; [ $start ktail0 ]
|
||||
(push! 3) ; [ $fac $start ktail0 ]
|
||||
(tail-call 1) ; [ 3 $fac $start ktail0 ]
|
||||
;; ↑ `tail-call' knows how to dispose of the caller's stack frame.
|
||||
)
|
||||
#+end_src
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
overlays = [
|
||||
haskellNix.overlay
|
||||
(final: prev: {
|
||||
gyehoek-wasm-runtime = final.callPackage ./wasm-runtime {
|
||||
shake-wrapper = final.callPackage ./shake-wrapper.nix {};
|
||||
gyehoek-runtime = final.callPackage ./runtime {
|
||||
crane-lib = inputs.crane.mkLib final;
|
||||
};
|
||||
gyehoek = final.haskell-nix.project' {
|
||||
src = ./.;
|
||||
compiler-nix-name = "ghc912";
|
||||
configureArgs = "-f-doctest";
|
||||
modules = [({ pkgs, lib, ...}: {
|
||||
packages.gyehoek.components.tests.test.preCheck =
|
||||
let
|
||||
@@ -34,16 +34,14 @@
|
||||
pkgs.git # tasty uses git diff
|
||||
];
|
||||
in ''
|
||||
export GYEHOEK_WASM_RUNTIME=${
|
||||
lib.getExe final.gyehoek-wasm-runtime
|
||||
}
|
||||
export GYEHOEK_RUNTIME=${lib.getExe final.gyehoek-runtime}
|
||||
export PATH=${lib.makeBinPath bin}:$PATH
|
||||
'';
|
||||
})];
|
||||
shell = {
|
||||
withHoogle = true;
|
||||
inputsFrom = [
|
||||
final.gyehoek-wasm-runtime
|
||||
final.gyehoek-runtime
|
||||
];
|
||||
tools = {
|
||||
cabal = {};
|
||||
@@ -51,18 +49,14 @@
|
||||
};
|
||||
buildInputs = with final; [
|
||||
haskellPackages.cabal-fmt
|
||||
shake-wrapper
|
||||
wabt
|
||||
nodejs
|
||||
wasm-tools
|
||||
wac-cli
|
||||
gauche
|
||||
guile
|
||||
rust-analyzer
|
||||
wasmtime
|
||||
# bashInteractive is necessary to work around an
|
||||
# optparse-applicative issue
|
||||
#
|
||||
# https://github.com/pcapriotti/optparse-applicative/pull/408
|
||||
bashInteractive
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -94,7 +88,7 @@
|
||||
hf.packages.${system} // lib.fix (packages: {
|
||||
gyehoek = hf.packages.${system}."gyehoek:exe:gyehoek";
|
||||
default = packages.gyehoek;
|
||||
inherit (pkgs) gyehoek-wasm-runtime;
|
||||
inherit (pkgs) gyehoek-runtime shake-wrapper;
|
||||
}));
|
||||
|
||||
devShells = each-system
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 9
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 17
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 10
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 456
|
||||
@@ -1 +0,0 @@
|
||||
(begin 123 456) ; => 456
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 123
|
||||
@@ -1 +0,0 @@
|
||||
(call/cc (λ (cc) (cc 123)))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 1234
|
||||
@@ -1 +0,0 @@
|
||||
(call/cc (λ (_) 1234))
|
||||
@@ -1,12 +0,0 @@
|
||||
(letrec ((iter (λ (n f)
|
||||
(if (zero? n)
|
||||
#f
|
||||
(begin (f n)
|
||||
(iter (- n 1) f))))))
|
||||
(call/cc
|
||||
(λ (k)
|
||||
(iter 10 (λ (n)
|
||||
;; i don't feel like implementing (= n 5) right now lmfao
|
||||
(if (zero? (- n 5))
|
||||
(k #t)
|
||||
#f))))))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > #t
|
||||
@@ -1,4 +0,0 @@
|
||||
(call/cc
|
||||
(λ (k)
|
||||
(begin (k #t)
|
||||
#f)))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > #t
|
||||
@@ -1,5 +0,0 @@
|
||||
;; confer ../callcc-early-exit-4
|
||||
(letrec ((app (λ (f x)
|
||||
(begin (f x)
|
||||
#f))))
|
||||
(call/cc (λ (k) (app k #t))))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > #t
|
||||
@@ -1,5 +0,0 @@
|
||||
;; confer ../callcc-early-exit-3
|
||||
(letrec ((app (λ (f x)
|
||||
(begin (f x)
|
||||
#f))))
|
||||
(call/cc (λ (k) (app (λ (x) (k x)) #t))))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > #t
|
||||
@@ -1,4 +0,0 @@
|
||||
(call/cc
|
||||
(λ (k)
|
||||
(begin ((λ () (k #t)))
|
||||
#f)))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 12
|
||||
@@ -1,4 +0,0 @@
|
||||
(* 2 (call/cc
|
||||
(λ (k)
|
||||
(begin (k 6)
|
||||
3))))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 456
|
||||
@@ -1,5 +0,0 @@
|
||||
(call/cc
|
||||
(λ (k1)
|
||||
(call/cc
|
||||
(λ (k2)
|
||||
(k1 456)))))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 456
|
||||
@@ -1,5 +0,0 @@
|
||||
(call/cc
|
||||
(λ (k1)
|
||||
(call/cc
|
||||
(λ (k2)
|
||||
(k2 456)))))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 155
|
||||
@@ -1,10 +0,0 @@
|
||||
(letrec ((factorial (λ (n)
|
||||
(if (zero? n)
|
||||
1
|
||||
(* n (factorial (- n 1)))))))
|
||||
(letrec ((sum-of-factorials
|
||||
(λ (n)
|
||||
(if (zero? n)
|
||||
0
|
||||
(+ (factorial n) (sum-of-factorials (- n 1)))))))
|
||||
(+ 2 (sum-of-factorials 5))))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > (6 . 7)
|
||||
@@ -1 +0,0 @@
|
||||
(cons 6 7)
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > (456 . 123)
|
||||
@@ -1,2 +0,0 @@
|
||||
(let ((p (cons 123 456)))
|
||||
(cons (cdr p) (car p)))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 2432902008176640000
|
||||
@@ -1,5 +0,0 @@
|
||||
(letrec ((fac (λ (n)
|
||||
(if (zero? n)
|
||||
1
|
||||
(* n (fac (- n 1)))))))
|
||||
(fac 20))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 16
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 16
|
||||
@@ -1,2 +0,0 @@
|
||||
(letrec ((square (λ (x) (* x x))))
|
||||
(square 4))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > 123
|
||||
@@ -1 +0,0 @@
|
||||
123
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > (0 . (1 . (4 . (9 . (16 . ())))))
|
||||
@@ -1,7 +0,0 @@
|
||||
(letrec ((my-map (λ (f l)
|
||||
(if (pair? l)
|
||||
(cons (f (car l))
|
||||
(my-map f (cdr l)))
|
||||
(list)))))
|
||||
(my-map (λ (x) (* x x))
|
||||
(list 0 1 2 3 4)))
|
||||
@@ -1,2 +0,0 @@
|
||||
ret > ExitSuccess
|
||||
out > #t
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +0,0 @@
|
||||
[0;31m([0m[0;95;1;3mbegin[0m
|
||||
책을
|
||||
더
|
||||
먹으세요~![0;31m)[0m
|
||||
@@ -1,4 +0,0 @@
|
||||
[0;31m([0m[0;95;1;3mbegin[0m
|
||||
책을
|
||||
더
|
||||
먹으세요~![0;31m)[0m
|
||||
@@ -1,5 +0,0 @@
|
||||
[0;31m([0m[0;95;1;3mlambda[0m
|
||||
[0;33m([0m어간
|
||||
어미[0;33m)[0m
|
||||
[0;33m([0mdisplay
|
||||
꾸깃[0;33m)[0m[0;31m)[0m
|
||||
@@ -1,2 +0,0 @@
|
||||
[0;31m([0m[0;95;1;3mlambda[0m [0;33m([0m어간 어미[0;33m)[0m
|
||||
[0;33m([0mdisplay 꾸깃[0;33m)[0m[0;31m)[0m
|
||||
@@ -1 +0,0 @@
|
||||
[0;31m([0m[0;31m)[0m
|
||||
@@ -1 +0,0 @@
|
||||
[0;31m([0m[0;33m([0m[0;32m([0m[0;34m([0m[0;35m([0m[0;35m)[0m[0;34m)[0m[0;32m)[0m[0;33m)[0m[0;31m)[0m
|
||||
@@ -1,4 +0,0 @@
|
||||
[0;31m([0m가
|
||||
나
|
||||
다
|
||||
라[0;31m)[0m
|
||||
@@ -1 +0,0 @@
|
||||
[0;31m([0m가 나 다 라[0;31m)[0m
|
||||
@@ -1,37 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/bool/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF ( SimpleBoolean True )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/bool/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 4
|
||||
}
|
||||
)
|
||||
} :< SimpleF ( SimpleBoolean True )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/bool/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 10
|
||||
}
|
||||
)
|
||||
} :< SimpleF ( SimpleBoolean False )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/bool/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 13
|
||||
}
|
||||
)
|
||||
} :< SimpleF ( SimpleBoolean False )
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
#t #true #f #false
|
||||
@@ -1,4 +0,0 @@
|
||||
#;(a datum comment can
|
||||
span multiple lines)
|
||||
|
||||
(but it ends here)
|
||||
@@ -1,33 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/decimal/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleNumber 45.0 )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/decimal/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 4
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleNumber 5667.0 )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/decimal/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 10
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleNumber
|
||||
( -123.0 )
|
||||
)
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
45 +5667 -123
|
||||
@@ -1,5 +0,0 @@
|
||||
[ Fix
|
||||
( SimpleF
|
||||
( Symbol "aaaa bc" )
|
||||
)
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
|aaaa bc|
|
||||
@@ -1 +0,0 @@
|
||||
[]
|
||||
Whitespace-only changes.
@@ -1,57 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-dot-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< CompoundF
|
||||
( DotListF
|
||||
(
|
||||
( MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-dot-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 2
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "가" )
|
||||
) :|
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-dot-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 5
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "나" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-dot-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 8
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "다" )
|
||||
]
|
||||
)
|
||||
( MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-dot-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 13
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "라" )
|
||||
)
|
||||
)
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
(가 나 다 . 라)
|
||||
@@ -1,83 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< CompoundF
|
||||
( ListF StyleData
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 2
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "가" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 5
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "나" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 8
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "다" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 11
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "라" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 14
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleNumber 1.0 )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 16
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleNumber 2.0 )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list-flat/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 18
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleNumber 3.0 )
|
||||
]
|
||||
)
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
(가 나 다 라 1 2 3)
|
||||
@@ -1,136 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< CompoundF
|
||||
( DotListF
|
||||
(
|
||||
( MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 2
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "a" )
|
||||
) :|
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 4
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "b" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 6
|
||||
}
|
||||
)
|
||||
} :< CompoundF
|
||||
( ListF StyleData
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 7
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "c" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 9
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "d" )
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
( MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 14
|
||||
}
|
||||
)
|
||||
} :< CompoundF
|
||||
( ListF StyleData
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 15
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "가" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 18
|
||||
}
|
||||
)
|
||||
} :< CompoundF
|
||||
( DotListF
|
||||
(
|
||||
( MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 19
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "나" )
|
||||
) :| []
|
||||
)
|
||||
( MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 24
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "다" )
|
||||
)
|
||||
)
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/list/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 28
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "라" )
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
(a b (c d) . (가 (나 . 다) 라))
|
||||
@@ -1,10 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/meta-expression/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< MetaF "aHaskellVariable + abc * 2"
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
#{aHaskellVariable + abc * 2}
|
||||
@@ -1,2 +0,0 @@
|
||||
##{case 123 of { 123 -> blah
|
||||
; xyz -> flah }}
|
||||
@@ -1,10 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/meta-splice-expression/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< MetaSpliceF "takeWhile (\x -> even x) aHaskellList"
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
##{takeWhile (\x -> even x) aHaskellList}
|
||||
@@ -1,10 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/meta-splice-variable/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< MetaSpliceF "aHaskellList"
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
##{aHaskellList}
|
||||
@@ -1,10 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/meta-variable/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< MetaF "aHaskellVariable"
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
#{aHaskellVariable}
|
||||
@@ -1,61 +0,0 @@
|
||||
[ MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/peculiar-identifier-dot/source.scm"
|
||||
, sourceLine = Pos 1
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "..." )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/peculiar-identifier-dot/source.scm"
|
||||
, sourceLine = Pos 2
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol ".." )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/peculiar-identifier-dot/source.scm"
|
||||
, sourceLine = Pos 3
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol ".abc" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/peculiar-identifier-dot/source.scm"
|
||||
, sourceLine = Pos 4
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol "....abcc" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/peculiar-identifier-dot/source.scm"
|
||||
, sourceLine = Pos 5
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol ".++-" )
|
||||
, MkAnn
|
||||
{ position = Just
|
||||
( SourcePos
|
||||
{ sourceName = "golden/read/peculiar-identifier-dot/source.scm"
|
||||
, sourceLine = Pos 6
|
||||
, sourceColumn = Pos 1
|
||||
}
|
||||
)
|
||||
} :< SimpleF
|
||||
( SimpleSymbol ".-" )
|
||||
]
|
||||
Loaded 100 of 173 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user