th-format alternatives and similar packages
Based on the "Data" category.
Alternatively, view th-format alternatives based on common mentions on social networks and blogs.
-
semantic-source
Parsing, analyzing, and comparing source code across many languages -
lens
Lenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens -
code-builder
Packages for defining APIs, running them, generating client code and documentation. -
text
Haskell library for space- and time-efficient operations over Unicode text. -
cassava
A CSV parsing and encoding library optimized for ease of use and high performance -
unordered-containers
Efficient hashing-based container types -
compendium-client
Mu (μ) is a purely functional framework for building micro services. -
holmes
A reference library for constraint-solving with propagators and CDCL. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
primitive
This package provides various primitive memory-related operations. -
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. -
discrimination
Fast linear time sorting and discrimination for a large class of data types -
IORefCAS
A collection of different packages for CAS based data structures. -
audiovisual
Extensible records, variants, structs, effects, tangles -
dependent-sum
Dependent sums and supporting typeclasses for comparing and displaying them -
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms -
dependent-map
Dependently-typed finite maps (partial dependent products) -
orgmode-parse
Attoparsec parser combinators for parsing org-mode structured text! -
scientific
Arbitrary-precision floating-point numbers represented using scientific notation -
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of th-format or a related project?
README
th-format
About
This is th-format
, a Haskell package implementing support for format
strings using Template Haskell quasi quoters. It requires the GHC
extension QuasiQuotes
to be enabled. Parsing is implemented using
Earley.
This package is BSD3 licensed.
Examples
Using th-format
, you can use naive variable interpolation instead of
verbosely concatenating strings manually. Thus, instead of
putStrLn $ "Client \"" ++ show client ++ "\" has requested resource \"" ++ show resource ++ "\" at date " ++ show date ++ "."
one can directly write:
putStrLn $ [fmt|Client "$client" has requested resource "$resource" at date $date|]
There are currently two supported ways of interpolation:
- Simple interpolation, as in
[fmt|Variable foo contains $foo|]
. - Expression interpolation, as in
[fmt|The toggle is ${if toggle then ("on" :: Text) else "off"}|]
*Note that all licence references and agreements mentioned in the th-format README section above
are relevant to that project's source code only.