HListPP

A preprocessor for HList labelable labels http://code.haskell.org/~aavogt/HListPP

Latest on Hackage:0.2.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed and maintained by Adam Vogt

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

Changes

Nov 6 2015
Release 0.2.1

Change base dependency bounds

May 28 2014
Release 0.2
Report filename given an error.
Avoid parsing within comments.

May 20 2014
Initial release 0.1
comments powered byDisqus