The HListPP package

[Tags: bsd3, library, program]

A preprocessor that replaces `longDescriptiveName with

 hLens' (Label :: Label "longDescriptiveName")

Use with ghc flags -F -pgmF HListPP, which can be added per-file with a pragma:

 ❴-# OPTIONS_GHC -F -pgmF HListPP #-❵ -- change braces to ascii (haddock doesn't allow literal comments in files)

Note that `labels is expanded to something that takes up about 26 more columns. To avoid issues with layout, put a newline after keywords that introduce layout, at least if there are `labels in the same row. In other words:

 `character.`position.`x %= \ x -> let
      msg = "a really long message about x>0"
      pos = x - 5
    in if pos < 0
          then error msg
          else pos

Instead of

 `character.`position.`x %= \ x -> let msg = "a really long message about x>0"
                                       pos = x - 5
                            in if pos < 0
                                then error msg
                                else pos

A blank library is included in this package to make it possible to depend on HListPP


Properties

Versions0.1, 0.2
Dependenciesapplicative-quoters (==0.1.*), base (>=4.6 && <4.8), regex-applicative (==0.3.*)
LicenseBSD3
AuthorAdam Vogt <vogt.adam@gmail.com>
MaintainerAdam Vogt <vogt.adam@gmail.com>
CategoryDevelopment
Home pagehttp://code.haskell.org/~aavogt/HListPP
ExecutablesHListPP
Upload dateWed May 28 17:31:43 UTC 2014
Uploaded byAdamVogt
Downloads109 total (14 in last 30 days)

Modules

Downloads

Maintainers' corner

For package maintainers and hackage trustees