heterogeneous-list-literals: Allows the use of tuples as literals for Heterogeneous collections

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

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

Properties

Versions0.1.0.1, 0.2.0.0, 0.2.0.0
Change logChangeLog.md
Dependenciesbase (>=4.9 && <4.12), Only (==0.1.*) [details]
LicenseBSD-3-Clause
AuthorDavid Millar-Durrant
Maintainerdmillardurrant@gmail.com
CategoryData
Home pagehttps://github.com/davidm-d/heterogeneous-list-literals
Source repositoryhead: git clone https://github.com/davidm-d/heterogeneous-list-literals
UploadedSun Jul 8 00:25:07 UTC 2018 by DavidMD

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees