尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗heff is a functional language with a Haskell-like syntax and a phase distinction: types are computed at compile time, data at run time.
{a : Type} -> ... -- while
run-time data (numbers, strings, data types) never reaches a type.module hello
import co
import std.io
-- | `f` applied to each element
-- | >>> map not [True, False]
-- | [False, True]
map : {a b : Type} -> (a -> b) -> List a -> List b
map f [] = []
map f (y :: ys) = f y :: map f ys
main : Co stdio Unit
main = do
let ls : List String = ["heff", "world"]
for x in ls do
print $ "Hello, " ^ x ^ "!"
heff run hello.hf prints the two greetings; heff test hello.hf
checks the doc test of map.
With zig and make (Node.js only for some of the tests):
make install # build .heff/out/heff, then install it into ~/.heff/bin/
Put ~/.heff/bin on your PATH.
heff init hello # a new project: a module, a program, a test
cd hello
heff build # check src/, build each program to .heff/bin/
heff test # the doc tests, watches and tests of src/ and test/
heff run app/hello/main.hf # run a program (C, by zig), without a build
heff install # build to run fastest, into ~/.heff/bin/
heff fmt src/hello/*.hf # format in place
heff dev # build and run; again at each change
heff help lists every command, and heff help COMMAND its flags.
editors/vscode, a client of
heff lsp -- diagnostics, hover, go to definition, completion,
formatting, renaming. A release has it built (heff-X.Y.Z.vsix).editors/bat, a
syntax for .hf files.The tutorial and the reference: https://0xfe-project.github.io/heff/.
make build # .heff/out/heff (from the seed, the first time)
make check # all a change is held to: from the seed, every test, the layout
make # every target
How the source is laid out, the seed and the test groups are in DEVELOPING.md.
co.