The HList package

[ Tags: data, library, mit ] [ Propose Tags ]

HList provides many operations to create and manipulate heterogenous lists (HLists) whose length and element types are known at compile-time. HLists are used to implement

User code should import Data.HList or Data.HList.CommonMain for a slightly more limited scope

[Skip to Readme]


Versions 0.1, 0.1.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.3.0,,,,,,,,
Change log ChangeLog
Dependencies array, base (>=4.6 && <4.9), base-orphans, ghc-prim, mtl, profunctors, tagged, template-haskell [details]
License MIT
Author 2004 Oleg Kiselyov (FNMOC, Monterey), Ralf Laemmel (CWI/VU, Amsterdam), Keean Schupke (London)
Category Data
Source repository head: darcs get
Uploaded Tue Dec 22 23:25:15 UTC 2015 by AdamVogt
Distributions NixOS:
Downloads 7537 total (685 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI


  • Data
    • Data.HList
      • Data.HList.CommonMain
      • Data.HList.Data
      • Data.HList.FakePrelude
      • Data.HList.HArray
      • Data.HList.HCurry
      • Data.HList.HList
      • Data.HList.HListPrelude
      • Data.HList.HOccurs
      • Data.HList.HSort
      • Data.HList.HTypeIndexed
      • Data.HList.HZip
      • Data.HList.Keyword
      • Data.HList.Label3
      • Data.HList.Label5
      • Data.HList.Label6
      • Data.HList.Labelable
      • Data.HList.MakeLabels
      • Data.HList.Record
      • Data.HList.RecordPuns
      • Data.HList.RecordU
      • Data.HList.TIC
      • Data.HList.TIP
      • Data.HList.TIPtuple
      • Data.HList.TypeEqO
      • Data.HList.Variant




use Data.Type.Equality.== to define the instance of HEq instead of overlapping instances (in Data.HList.TypeEqO) (needs ghc >= 7.8)

This version does not allow `HEq x [x] f` to lead to f ~ False, unlike the version with overlapping instances. See


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for HList-

[back to package description]
(C) 2004--2010, Oleg Kiselyov, Ralf Laemmel, Keean Schupke

	Justin Bailey, Brian Bloniarz, Gwern Branwen, Einar Karttunen,
	and Adam Vogt

The HList library and samples


Getting the code

> darcs get


Pushing changes

You need an account at

> cd HList
> darcs pull
> darcs record
> darcs push


This distribution covers all essential issues discussed in the HList paper,
though the implementation has been adapted to ghc features implemented
after the paper's writing.

Additional examples and HList operations are provided.
The code from the database section of the HList paper is not included
since doing so would have implied inclusion of substantial packages,
namely the underlying infrastructure for database access library.

You can get HList from Hackage or from Darcs:

$ cabal update && cabal install HList


$ darcs get --partial
$ cd HList; cabal install

The code works --- within the limits exercised in the source files ---
for GHC-7.6 and GHC-7.8 and GHC-7.10. Older compilers are not supported.

One may run "cabal test" to check the distribution.

See ChangeLog for updates.