percent-format alternatives and similar packages
Based on the "Testing" category.
Alternatively, view percent-format alternatives based on common mentions on social networks and blogs.
-
curl-runnings
A declarative test framework for quickly and easily writing integration tests against JSON APIs. -
monad-mock
DISCONTINUED. A Haskell package that provides a monad transformer for mocking mtl-style typeclasses [GET https://api.github.com/repos/cjdev/monad-mock: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository] -
quickcheck-arbitrary-adt
Typeclass for generating a list of each instance of a sum type's constructors -
test-fixture
DISCONTINUED. Testing with monadic side-effects [GET https://api.github.com/repos/cjdev/test-fixture: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository] -
test-framework-th
Automagically (using Template Haskell) generates the Haskell-code you need when using HUnit -
tasty-ant-xml
A tasty ingredient to output test results in XML, using the Ant schema. This XML can be consumed by the Jenkins continuous integration framework.
CodeRabbit: AI Code Reviews for Developers

Do you think we are missing an alternative of percent-format or a related project?
README
PercentFormat -- C-like printf-style string formatting for Haskell
The Text.PercentFormat
library provides printf-style string formatting. It
provides a %
operator (as in Ruby or Python) and uses the old C-printf-style
format you know and love.
This library differs from Text.Printf
in that it does not rely on custom
typeclasses -- it works on anything that is a Show
instance.
Formatting one value:
> import Text.PercentFormat
> "Hello %s!" -% "World"
"Hello World!"
Formatting three values, tuple style, using -%%%
:
> "load average: %1.2f %1.2f %1.2f" -%%% (0.00, 0.066, 0.11)
"load average: 0.00 0.07 0.11"
Formatting three values, chain style, using %
and -%
:
> "load average: %1.2f %1.2f %1.2f" % 0.00 % 0.066 -% 0.11
"load average: 0.00 0.07 0.11"
To produce a string with a percent sign (%
),
use two percent signs (%%
):
> "memory usage: %i%%" -% 13
"memory usage: 13%"
Percent signs are duplicated when using the %
operator to allow chaining:
> "percent sign: %s, memory usage: %i%%" % "%" % 87
"percent sign: %%, memory usage: 87%%"
Always use the -%
operator when formatting the last value
to remove duplicate %
signs:
> "percent sign: %s, memory usage: %i%%" % "%" -% 87
"percent sign: %, memory usage: 87%"
To print, just prefix you format expression with putStrLn $
:
> putStrLn $ "Hello %s!" -% "World"
Hello World!
For more information and a detailed list of options, see PercentFormat's Haddock Documentation.
PercentFormat is a work in progress. Any help or pull requests are welcome. See [PercentFormat's TO DO list] for ideas on how to contribute.
Installing
To install the latest PercentFormat version from Hackage, just run:
$ cabal update
$ cabal install percent-format