# 使用 Homebrew, apk, Nix 安装 koka

查看 koka 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:koka
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install koka
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add koka
```

  证据: Alpine Linux edge package indexes: koka from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#koka
```

  证据: nixpkgs package indexes: pkgs/by-name/ko/koka/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:koka
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/koka>
- **版本:** 3.2.3
- **来源摘要:** Compiler for the Koka language
- **主页:** <http://koka-lang.org>
- **仓库:** <https://github.com/koka-lang/koka>
- **上游文档:** <http://koka-lang.org>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/koka-lang/koka.git>
- **最后更新:** 2026-07-30T13:49:58-04:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- koka (cli)
- koka (别名)

## 依赖

- gmp

## 构建依赖

- cabal-install
- ghc
- pcre2

## macOS 提供的库

- libffi

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 3.2.3
- 管理器更新时间: 2026-07-30
- 本地数据: OK
- 上游仓库: https://github.com/koka-lang/koka
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

Koka is a research programming language and compiler centered on effect types, algebraic effect handlers, and functional programming with practical compilation. In package-manager terms, it is a small but notable language-runtime package: not mainstream production infrastructure, but a living research compiler users can install with one command.

### 项目历史

Microsoft Research records the Koka project as established on 2012-04-13. Daan Leijen's project materials describe it as a strongly typed functional-style language with effect types and handlers, using a small core of composable language features rather than many special-case extensions.

Koka's early academic identity was tied to row-polymorphic effect types. The 2014 paper 'Koka: Programming with Row-polymorphic Effect Types' describes Koka as implementing the effect system and being used for small to medium examples. Later work pushed effect handlers and efficient implementation techniques, including 2021 ICFP work on generalized evidence passing for effect handlers.

The v3 documentation dated 2026-03-17 describes Koka v3 as a research language under development, stable enough that the compiler implements the full specification, but lacking mature async libraries and package management. That positioning explains why package-manager availability is useful even though the language is not a broad application platform.

### 采用历史

Koka's adoption is primarily academic and experimental. It is used to explore effect typing, handlers, Perceus optimized reference counting, reuse analysis, and functional-but-in-place programming ideas rather than to anchor a large industrial ecosystem.

Homebrew, Alpine, and Nix packaging make it easier for programming-language researchers, students, and curious developers to run the compiler without building the Haskell/C toolchain path manually. That matters because research languages often fail at the first install step; a package keeps the barrier low.

### 使用方式

Users install Koka to compile and experiment with `.kk` programs, run examples from the language book, explore effect handlers, and test language-design ideas around typed effects and memory management. The command-line compiler is the main package surface.

Because the documentation explicitly notes missing package management and limited async libraries, Koka is best understood as a language lab and compiler package rather than a general-purpose runtime ecosystem comparable to Go, Rust, Python, or Haskell.

### 为什么软件包爱好者会关心

Koka is the kind of package that makes language-runtime sections interesting: it exposes active programming-language research through a normal package manager. Its presence beside production compilers lets users compare how ideas such as algebraic effects and handlers move from papers into runnable tools.

It also shows the long tail of package indexes. Not every compiler package is there for production deployment; some are there because a reproducible install is the difference between reading a paper and trying the idea.

### 时间线

- 2012-04-13: Microsoft Research records the Koka project as established.
- 2014: Daan Leijen published work on Koka and row-polymorphic effect types.
- 2021-08-23: The Koka book notes ICFP 2021 work on generalized evidence passing for effect handlers.
- 2024-01-13: GitHub release metadata records Koka v3.0.0.
- 2026-03-17: The Koka book dated 2026-03-17 documents Koka v3.2.3.

### Related projects

- Koka belongs near research and functional languages such as Haskell, OCaml, Eff, Links, and Multicore OCaml discussions of algebraic effects. Its implementation work also relates to compiler research on reference counting, effect-handler compilation, and typed intermediate representations.

### 来源

- <https://api.github.com/repos/koka-lang/koka/releases>
- <https://arxiv.org/pdf/1406.2061>
- <https://koka-lang.github.io/koka/doc/book.html>
- <https://www.microsoft.com/en-us/research/project/koka/>
- <https://www.microsoft.com/en-us/research/publication/first-class-named-effect-handlers/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** koka
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - koka: normalized package name match | nixpkgs package indexes: pkgs/by-name/ko/koka/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - koka - 3.2.2-r1: normalized package name match | Alpine Linux edge package indexes: koka from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Strongly typed functional-style language with effect types and handlers | https://koka-lang.github.io/


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [pcre2](https://pkg.so/zh-hans/brew/pcre2/) - Build dependency declared by Homebrew.
- [cabal-install](https://pkg.so/zh-hans/brew/cabal-install/) - Build dependency declared by Homebrew.
- [ghc](https://pkg.so/zh-hans/brew/ghc/) - Build dependency declared by Homebrew.
- [purescript](https://pkg.so/zh-hans/brew/purescript/) - Shares pkgdb curated category or tags: cli, compiler, functional-programming, language-runtime, programming-language.
- [coconut](https://pkg.so/zh-hans/brew/coconut/) - Shares pkgdb curated category or tags: cli, compiler, functional-programming, language-runtime, programming-language.
- [mercury](https://pkg.so/zh-hans/brew/mercury/) - Shares pkgdb curated category or tags: cli, compiler, functional-programming, language-runtime, programming-language.
- [never](https://pkg.so/zh-hans/brew/never/) - Shares pkgdb curated category or tags: cli, compiler, functional-programming, language-runtime, programming-language.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language.
- [lua](https://pkg.so/zh-hans/brew/lua/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language.
- [elixir](https://pkg.so/zh-hans/brew/elixir/) - Shares pkgdb curated category or tags: cli, functional-programming, language-runtime, programming-language.
- [kotlin](https://pkg.so/zh-hans/brew/kotlin/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language.
- [elm](https://pkg.so/zh-hans/brew/elm/) - Local package facts share a topical domain. Shared terms: cli, functional, functional-programming, gmp, language.
- [futhark](https://pkg.so/zh-hans/brew/futhark/) - Local package facts share a topical domain. Shared terms: cli, compiler, functional, functional-programming, gmp.

## Combined YAML source

View the package source record on GitHub. [combined/koka.yml](https://github.com/mxcl/pkgdb/blob/main/combined/koka.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
