Compare commits
1
Commits
main
..
baa5d248fd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baa5d248fd |
+6
-16
@@ -1,19 +1,9 @@
|
|||||||
((haskell-mode
|
((haskell-cabal-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
|
|
||||||
. ((eval
|
. ((eval
|
||||||
. (progn (defun apply-cabal-fmt-h ()
|
. (progn (defun apply-cabal-fmt-h ()
|
||||||
(haskell-mode-buffer-apply-command "cabal-fmt"))
|
(haskell-mode-buffer-apply-command "cabal-fmt"))
|
||||||
(add-hook 'before-save-hook #'apply-cabal-fmt-h nil t)))))
|
(add-hook 'before-save-hook #'apply-cabal-fmt-h nil t)
|
||||||
(scheme-mode
|
(add-to-list 'haskell-font-lock-quasi-quote-modes
|
||||||
. ((eval . (dolist (s '(kappa κ prim))
|
'("cps" . scheme-mode))
|
||||||
(put s 'scheme-indent-function 1)))))
|
(add-to-list 'haskell-font-lock-quasi-quote-modes
|
||||||
(nil
|
'("scm" . scheme-mode)))))))
|
||||||
. ((eval
|
|
||||||
. (progn (defun display-ansi ()
|
|
||||||
(interactive)
|
|
||||||
(ansi-color-apply-on-region (point-min) (point-max))))))))
|
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
use flake
|
use flake
|
||||||
watch_file gyehoek.cabal cabal.project
|
|
||||||
PATH_add $(dirname $(cabal list-bin gyehoek))
|
|
||||||
|
|||||||
@@ -9,4 +9,3 @@ dist-newstyle
|
|||||||
.direnv
|
.direnv
|
||||||
result
|
result
|
||||||
play/
|
play/
|
||||||
trace.html
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
packages: *.cabal
|
packages: *.cabal
|
||||||
tests: True
|
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
|
source-repository-package
|
||||||
type: git
|
type: git
|
||||||
|
|||||||
@@ -132,34 +132,3 @@ multiple ~env-ref~ calls could probably be replaced with a primitive that loads
|
|||||||
$code)
|
$code)
|
||||||
1))))
|
1))))
|
||||||
#+end_src
|
#+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,12 @@
|
|||||||
overlays = [
|
overlays = [
|
||||||
haskellNix.overlay
|
haskellNix.overlay
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
gyehoek-wasm-runtime = final.callPackage ./wasm-runtime {
|
gyehoek-runtime = final.callPackage ./runtime {
|
||||||
crane-lib = inputs.crane.mkLib final;
|
crane-lib = inputs.crane.mkLib final;
|
||||||
};
|
};
|
||||||
gyehoek = final.haskell-nix.project' {
|
gyehoek = final.haskell-nix.project' {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
compiler-nix-name = "ghc912";
|
compiler-nix-name = "ghc912";
|
||||||
configureArgs = "-f-doctest";
|
|
||||||
modules = [({ pkgs, lib, ...}: {
|
modules = [({ pkgs, lib, ...}: {
|
||||||
packages.gyehoek.components.tests.test.preCheck =
|
packages.gyehoek.components.tests.test.preCheck =
|
||||||
let
|
let
|
||||||
@@ -34,16 +33,14 @@
|
|||||||
pkgs.git # tasty uses git diff
|
pkgs.git # tasty uses git diff
|
||||||
];
|
];
|
||||||
in ''
|
in ''
|
||||||
export GYEHOEK_WASM_RUNTIME=${
|
export GYEHOEK_RUNTIME=${lib.getExe final.gyehoek-runtime}
|
||||||
lib.getExe final.gyehoek-wasm-runtime
|
|
||||||
}
|
|
||||||
export PATH=${lib.makeBinPath bin}:$PATH
|
export PATH=${lib.makeBinPath bin}:$PATH
|
||||||
'';
|
'';
|
||||||
})];
|
})];
|
||||||
shell = {
|
shell = {
|
||||||
withHoogle = true;
|
withHoogle = true;
|
||||||
inputsFrom = [
|
inputsFrom = [
|
||||||
final.gyehoek-wasm-runtime
|
final.gyehoek-runtime
|
||||||
];
|
];
|
||||||
tools = {
|
tools = {
|
||||||
cabal = {};
|
cabal = {};
|
||||||
@@ -55,14 +52,9 @@
|
|||||||
nodejs
|
nodejs
|
||||||
wasm-tools
|
wasm-tools
|
||||||
wac-cli
|
wac-cli
|
||||||
gauche
|
guile
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
wasmtime
|
wasmtime
|
||||||
# bashInteractive is necessary to work around an
|
|
||||||
# optparse-applicative issue
|
|
||||||
#
|
|
||||||
# https://github.com/pcapriotti/optparse-applicative/pull/408
|
|
||||||
bashInteractive
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -94,7 +86,7 @@
|
|||||||
hf.packages.${system} // lib.fix (packages: {
|
hf.packages.${system} // lib.fix (packages: {
|
||||||
gyehoek = hf.packages.${system}."gyehoek:exe:gyehoek";
|
gyehoek = hf.packages.${system}."gyehoek:exe:gyehoek";
|
||||||
default = packages.gyehoek;
|
default = packages.gyehoek;
|
||||||
inherit (pkgs) gyehoek-wasm-runtime;
|
inherit (pkgs) gyehoek-runtime;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
devShells = each-system
|
devShells = each-system
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
(begin 123 456) ; => 456
|
|
||||||
@@ -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,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,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,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
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
ret > ExitSuccess
|
ret > ExitSuccess
|
||||||
out > #t
|
out > 720
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
(if (zero? n)
|
(if (zero? n)
|
||||||
1
|
1
|
||||||
(* n (fac (- n 1)))))))
|
(* n (fac (- n 1)))))))
|
||||||
(fac 20))
|
(fac 6))
|
||||||
@@ -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 @@
|
|||||||
[]
|
|
||||||
@@ -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 ".-" )
|
|
||||||
]
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
...
|
|
||||||
..
|
|
||||||
.abc
|
|
||||||
....abcc
|
|
||||||
.++-
|
|
||||||
.-
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user