boat
所属分类:其他
开发工具:Haskell
文件大小:0KB
下载次数:0
上传日期:2024-02-11 21:23:32
上 传 者:
sh-1993
说明: Boat编程语言的编译器
(The compiler for the Boat programming language)
文件列表:
src/
LICENSE
Setup.hs
TODO.md
boat.cabal
boat.vim
Boat
====
See [the old repo](https://github.com/scott2000/boat-old) for compilation to
LLVM IR. I never finished this new implementation due to issues with
bidirectional type inference of effect variables with subtyping. I may resume
this project in the future, but it is currently not in active development.
This is the compiler for the boat programming language
*(it's a work in progress so don't expect too much just yet)*
## An example program
```boat
use Nat (S, Z, (*))
let fac = fun
Z -> S Z
(S n) ->
S n * fac n
data mod Nat =
Z
S Nat
mod Nat =
operator type Add < Mul
operator (+) : Add
operator (*) : Mul
let (+) = fun
Z y -> y
(S x) y -> x + S y
let (*) = fun
Z _ -> Z
(S x) y -> y + x * y
```
近期下载者:
相关文件:
收藏者: