simpl

所属分类:编译器/解释器
开发工具:Haskell
文件大小:54KB
下载次数:0
上传日期:2020-01-04 04:02:05
上 传 者sh-1993
说明:  一种受函数式编程语言思想启发的简单命令式编程语言
(A simple imperative programming language inspired by ideas in functional programming languages)

文件列表:
.circleci (0, 2020-01-04)
.circleci\config.yml (784, 2020-01-04)
.circleci\images (0, 2020-01-04)
.circleci\images\Dockerfile (143, 2020-01-04)
ChangeLog.md (50, 2020-01-04)
LICENSE (11358, 2020-01-04)
Makefile (524, 2020-01-04)
Setup.hs (1233, 2020-01-04)
compiler (0, 2020-01-04)
compiler\Simplc.hs (4097, 2020-01-04)
editor (0, 2020-01-04)
editor\emacs (0, 2020-01-04)
editor\emacs\simpl-mode.el (1753, 2020-01-04)
package.yaml (1881, 2020-01-04)
repl (0, 2020-01-04)
repl\SimplRepl.hs (74, 2020-01-04)
runtime (0, 2020-01-04)
runtime\Makefile (442, 2020-01-04)
runtime\bdwgc (0, 2020-01-04)
runtime\runtime.c (1738, 2020-01-04)
runtime\runtime.h (1963, 2020-01-04)
sample.spl (1932, 2020-01-04)
src (0, 2020-01-04)
src\Simpl (0, 2020-01-04)
src\Simpl\Annotation.hs (4721, 2020-01-04)
src\Simpl\Ast.hs (6549, 2020-01-04)
src\Simpl\AstToJoinIR.hs (13804, 2020-01-04)
src\Simpl\Backend (0, 2020-01-04)
src\Simpl\Backend\Codegen.hs (25500, 2020-01-04)
src\Simpl\Backend\Runtime.hs (5561, 2020-01-04)
src\Simpl\Cli.hs (1334, 2020-01-04)
src\Simpl\Compiler.hs (3142, 2020-01-04)
src\Simpl\CompilerOptions.hs (405, 2020-01-04)
src\Simpl\JoinIR (0, 2020-01-04)
src\Simpl\JoinIR\Syntax.hs (5834, 2020-01-04)
src\Simpl\JoinIR\Verify.hs (4564, 2020-01-04)
... ...

[![CircleCI](https://circleci.com/gh/Technius/simpl.svg?style=svg)](https://circleci.com/gh/Technius/simpl) # simpl-lang `SimPL` is a **s**imple **im**perative **p**rogramming **l**anguage inspired by functional programming. It comes with a compiler that uses LLVM to generate native machine code. See [this sample file](sample.spl) for a brief demonstration example of the syntax. For more comprehensive examples, check out the [test suite](test-suite). Current language features: * Integers and floats, with explicit numeric conversions * Strings * Algebraic data types: sum types, product types * Functions and function application * Function references (to static functions only right now) * Static types with type inference * Rank 1 parametric polymorphism ## Compiling LLVM 9 and clang 9 must be installed. To compile, run `stack build`. When developing, use the `--fast` flag. The test suite programs can be compiled with `make test` and the generated executables can be found in `test-suite/bin`. ## Usage The SimPL runtime currently uses the [`boehm-gc`](https://github.com/ivmai/bdwgc) garbage collector to handle heap allocations. When linking object files created by `simplc`, make sure that you link `libgc` as well. Run the compiler using ```bash stack run simplc -- -o ``` To debug the compiler, use one or more of the `--dump-joinir` and `--dump-ir` flags. ## License Copyright 2018-2019 Bryan Tan ("Technius") Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

近期下载者

相关文件


收藏者