[Haskell-cafe] HList and Type signatures / synonyms

Justin Bailey jgbailey at gmail.com
Wed Sep 9 00:19:02 EDT 2009


I've got a little experience with HList - read below.

2009/9/6 Günther Schmidt <gue.schmidt at web.de>:
> Hi,
> I keep accumulating values and right now use plain tuples for that. I end up
> with a 12 element tuple and things are a bit messy.
> I'd like to use extensible Records from HList instead, thing is I'd like to
> keep putting type signatures in my code. As it turns out that seems to be
> where it gets messy with HList.

There is a template haskell function called "makeLabel" that can
generate the boilerplate for you. If you are comfortable not seeing
all the type definitions, it might do the trick.

> PS: Does anyone know why there are Label-n modules in HList, and which one
> to use?

I don't but Label4 works for me.


More information about the Haskell-Cafe mailing list