├── .gitignore ├── .ruby-version ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── Setup.hs ├── app └── Main.hs ├── forest-compiler.cabal ├── js └── string.js ├── logo.svg ├── nix ├── dependencies.nix ├── test-shell.nix └── wabt.nix ├── samples ├── addOne.tree ├── annotation.tree ├── arithmetic.tree ├── bool.tree ├── closure.tree ├── deconstruction.tree ├── fib.tree ├── let.tree ├── list.tree ├── maybe.tree ├── moving_block │ ├── index.html │ └── moving_block.tree ├── result.tree ├── spring.tree ├── string.tree └── test.tree ├── shell.nix ├── src ├── Compiler.hs ├── HaskellSyntax.hs ├── Language.hs ├── TypeChecker.hs └── Wasm.hs ├── stack.yaml ├── stack.yaml.lock ├── test ├── Arbitrary.hs ├── HaskellSyntaxSpec.hs ├── SampleSpec.hs ├── Spec.hs ├── TypeCheckerSpec.hs ├── WasmSpec.hs ├── fixtures │ ├── case-deconstruction.tree │ ├── case-statement-and-more.tree │ ├── case-statement.tree │ ├── deconstruction.tree │ ├── let.tree │ └── multiple-assignments.tree ├── integration.rb └── samples │ ├── invalid │ ├── incomplete_definition.tree │ └── mistyped_argument_deconstruction.tree │ └── valid │ ├── argument_deconstruction.tree │ ├── float.tree │ ├── list.tree │ ├── nested_deconstruction.tree │ ├── result.tree │ ├── simple_int_defintion.tree │ └── simple_string_definition.tree ├── wasm-interp └── wasm-server /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/.gitignore -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.3 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/README.md -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | 3 | main = defaultMain 4 | -------------------------------------------------------------------------------- /app/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/app/Main.hs -------------------------------------------------------------------------------- /forest-compiler.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/forest-compiler.cabal -------------------------------------------------------------------------------- /js/string.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/js/string.js -------------------------------------------------------------------------------- /logo.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/logo.svg -------------------------------------------------------------------------------- /nix/dependencies.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/nix/dependencies.nix -------------------------------------------------------------------------------- /nix/test-shell.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/nix/test-shell.nix -------------------------------------------------------------------------------- /nix/wabt.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/nix/wabt.nix -------------------------------------------------------------------------------- /samples/addOne.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/addOne.tree -------------------------------------------------------------------------------- /samples/annotation.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/annotation.tree -------------------------------------------------------------------------------- /samples/arithmetic.tree: -------------------------------------------------------------------------------- 1 | add x y = x + y 2 | -------------------------------------------------------------------------------- /samples/bool.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/bool.tree -------------------------------------------------------------------------------- /samples/closure.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/closure.tree -------------------------------------------------------------------------------- /samples/deconstruction.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/deconstruction.tree -------------------------------------------------------------------------------- /samples/fib.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/fib.tree -------------------------------------------------------------------------------- /samples/let.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/let.tree -------------------------------------------------------------------------------- /samples/list.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/list.tree -------------------------------------------------------------------------------- /samples/maybe.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/maybe.tree -------------------------------------------------------------------------------- /samples/moving_block/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/moving_block/index.html -------------------------------------------------------------------------------- /samples/moving_block/moving_block.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/moving_block/moving_block.tree -------------------------------------------------------------------------------- /samples/result.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/result.tree -------------------------------------------------------------------------------- /samples/spring.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/spring.tree -------------------------------------------------------------------------------- /samples/string.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/samples/string.tree -------------------------------------------------------------------------------- /samples/test.tree: -------------------------------------------------------------------------------- 1 | a :: A 2 | n e = 3 | "" 4 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/shell.nix -------------------------------------------------------------------------------- /src/Compiler.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/src/Compiler.hs -------------------------------------------------------------------------------- /src/HaskellSyntax.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/src/HaskellSyntax.hs -------------------------------------------------------------------------------- /src/Language.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/src/Language.hs -------------------------------------------------------------------------------- /src/TypeChecker.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/src/TypeChecker.hs -------------------------------------------------------------------------------- /src/Wasm.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/src/Wasm.hs -------------------------------------------------------------------------------- /stack.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/stack.yaml -------------------------------------------------------------------------------- /stack.yaml.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/stack.yaml.lock -------------------------------------------------------------------------------- /test/Arbitrary.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/Arbitrary.hs -------------------------------------------------------------------------------- /test/HaskellSyntaxSpec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/HaskellSyntaxSpec.hs -------------------------------------------------------------------------------- /test/SampleSpec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/SampleSpec.hs -------------------------------------------------------------------------------- /test/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/Spec.hs -------------------------------------------------------------------------------- /test/TypeCheckerSpec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/TypeCheckerSpec.hs -------------------------------------------------------------------------------- /test/WasmSpec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/WasmSpec.hs -------------------------------------------------------------------------------- /test/fixtures/case-deconstruction.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/fixtures/case-deconstruction.tree -------------------------------------------------------------------------------- /test/fixtures/case-statement-and-more.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/fixtures/case-statement-and-more.tree -------------------------------------------------------------------------------- /test/fixtures/case-statement.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/fixtures/case-statement.tree -------------------------------------------------------------------------------- /test/fixtures/deconstruction.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/fixtures/deconstruction.tree -------------------------------------------------------------------------------- /test/fixtures/let.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/fixtures/let.tree -------------------------------------------------------------------------------- /test/fixtures/multiple-assignments.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/fixtures/multiple-assignments.tree -------------------------------------------------------------------------------- /test/integration.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/integration.rb -------------------------------------------------------------------------------- /test/samples/invalid/incomplete_definition.tree: -------------------------------------------------------------------------------- 1 | 2 | a :: Int 3 | a = 4 | -------------------------------------------------------------------------------- /test/samples/invalid/mistyped_argument_deconstruction.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/samples/invalid/mistyped_argument_deconstruction.tree -------------------------------------------------------------------------------- /test/samples/valid/argument_deconstruction.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/samples/valid/argument_deconstruction.tree -------------------------------------------------------------------------------- /test/samples/valid/float.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/samples/valid/float.tree -------------------------------------------------------------------------------- /test/samples/valid/list.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/samples/valid/list.tree -------------------------------------------------------------------------------- /test/samples/valid/nested_deconstruction.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/samples/valid/nested_deconstruction.tree -------------------------------------------------------------------------------- /test/samples/valid/result.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/test/samples/valid/result.tree -------------------------------------------------------------------------------- /test/samples/valid/simple_int_defintion.tree: -------------------------------------------------------------------------------- 1 | a :: Int 2 | a = 1 3 | -------------------------------------------------------------------------------- /test/samples/valid/simple_string_definition.tree: -------------------------------------------------------------------------------- 1 | a :: String 2 | a = "test" 3 | 4 | -------------------------------------------------------------------------------- /wasm-interp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/wasm-interp -------------------------------------------------------------------------------- /wasm-server: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forest-lang/forest-compiler/HEAD/wasm-server --------------------------------------------------------------------------------