math/hs-free 5.2nb5 NetBSD
Monads for free
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- License
- modified-bsd
- Categories
- math
- Package size
- 1637.6 KiB, 25879.1 KiB installed
Description
Free monads are useful for many tree-like structures and domain specific languages.
If f is a Functor then the free Monad on f is the type of trees whose nodes are labeled with the constructors of f. The word "free" is used in the sense of "unrestricted" rather than "zero-cost": Free f makes no constraining assumptions beyond those given by f and the definition of Monad. As used here it is a standard term from the mathematical theory of adjoint functors.
Cofree comonads are dual to free monads. They provide convenient ways to talk about branching streams and rose-trees, and can be used to annotate syntax trees. The cofree comonad can be seen as a stream parameterized by a Functor that controls its branching factor.
Install
Binary package:
pkgin install hs-free
From pkgsrc:
cd /usr/pkgsrc/math/hs-free && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 5.2nb5 |
| NetBSD 10.1 aarch64 | 5.2nb5 |
| SmartOS / illumos x86_64 | 5.2nb5 |
| macOS 15 arm64 | 5.2nb5 |