heterogeneous-list-literals: Allows the use of tuples as literals for Heterogeneous collections
This is an incredibly simple library, which makes writing literals for heterogeneous collections easy
If you write a function with the signature
hList :: HLL input output => input -> HList output
then
a :: HList '[] a = hList () b :: HList '[Bool] b = hList (Only True) c :: HList '[Bool, Int, Double, String] c = hList (True, 24, 10.5, "Fire")
The full code is in test/Docs.hs
This only supports literals of length up to 20, though that can be easily extended using the code generator in src/Data/HeterogeneousListLiterals
Downloads
- heterogeneous-list-literals-0.2.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.1, 0.2.0.0 |
|---|---|
| Change log | ChangeLog.md |
| Dependencies | base (>=4.9 && <4.12), Only (>=0.1 && <0.2) [details] |
| License | BSD-3-Clause |
| Author | David Millar-Durrant |
| Maintainer | dmillardurrant@gmail.com |
| Category | Data |
| Home page | https://github.com/davidm-d/heterogeneous-list-literals |
| Source repo | head: git clone https://github.com/davidm-d/heterogeneous-list-literals |
| Uploaded | by DavidMD at 2018-07-08T00:28:24Z |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 1372 total (2 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2018-07-08 [all 1 reports] |