Nice formatting library

Latest on Hackage:

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 to host generated Haddocks.

BSD3 licensed by Artyom
Maintained by

Nice formatting library


  • Added format from text-format, because in some cases it's nicer than brackets.

  • Renamed padCenterF to padBothF.

  • Modified indent and indent' to always add newlines.

  • Wrote documentation.

  • Added some formatters:

    • indent
    • formatters for lists, maps and tuples (listF, etc)
    • octF, binF, baseF and floating-point formatters
    • hexF which works on both numbers and bytestrings
    • ordinalF and commaizeF
    • padding and trimming formatters
    • base64F and base64UrlF
    • conditionals (whenF and unlessF)
  • Merged Fmt.IO with Fmt because orphan instances are controversial.

  • Exported internal classes and functions from Fmt.Internal.

  • Added fmt and fmtLn.

  • Made all operators associate to the right (Builder documentation says it's faster than the opposite).

  • Reexported Buildable and Builder.

  • Added >%%< so that it'd be possible to write %<a>%%<b>% instead of weird %<a%<b>%.

  • Added %<< ... >>%, which work work Show instead of Buildable. If you don't care about speed and just want to output something, use them.

  • Added an IO () instance in Fmt.IO. If you import that module, raw formatted strings would print themselves.

  • Added tests.

  • Changed fixities of operators so that %<n+1>% would work.

  • Changed license to BSD3 since all our dependencies are BSD3 and we can't use MIT.

First (completely experimental) release.

comments powered byDisqus