Description
Highbrow approach to type-safe printf format specifications.
Description
We use the co-Kleisli category for the comonad of functions out of a fixed monoid to implement a generic combinator library for type-safe format specifications. Works with pretty much anything that's a monoid, with specific support for String, Text (strict/lazy), and ByteString (strict/lazy). Credit to Daniel Patterson for introducing me to something that looked just enough like it ought to be the composition for a category, and Ryan Trinkle for the IsString instance. :)