Popularity
1.0
Stable
Activity
0.0
Stable
0
1
0

Monthly Downloads: 10
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Data    

heterogeneous-list-literals alternatives and similar packages

Based on the "Data" category.
Alternatively, view heterogeneous-list-literals alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of heterogeneous-list-literals or a related project?

Add another 'Data' Package

README

Heterogeneous List Literals

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.hs