There is a heterogeneous list type of HList (available on Hackage), but note that there is probably a content type of your list. Consider something like this:
history = [-12, "STATEMENT END", (-244, time January 4 2010), ...]
Your data has a type trying to appear, for example:
data HistoryEntry = Withdrawal Int | StatementClosing | ScheduledPayment Int CalendarTime history = [Withdrawal 12, StatementClosing, ScheduledPayment 244 (time January 4 2010)]
In many cases, your data is of the type that you just need to look for.
source share