heterogeneous-list-literals

Allows the use of tuples as literals for Heterogeneous collections

https://github.com/davidm-d/heterogeneous-list-literals

Latest on Hackage:0.2.0.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by David Millar-Durrant
Maintained by [email protected]

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