AJChapman / formatting

Format strings type-safely with combinators
BSD 3-Clause "New" or "Revised" License
164 stars 39 forks source link

Add sprint :: Format String a -> a #38

Closed ocharles closed 5 years ago

ocharles commented 6 years ago

Could we have the mentioned function added?

sprint = Data.Text.unpack . format

but would be rather useful. I'm trying to use formatting for all my presentational strings, and some other libraries require Strings (e.g., displayException from the Exception class).

chrisdone commented 6 years ago

There is formatToString exported in Formatting top-level.

chrisdone commented 6 years ago

http://hackage.haskell.org/package/formatting-6.3.2/docs/Formatting.html#v:formatToString

ocharles commented 6 years ago

Oh, could it be moved into the "Top-level functions" section? I expected to find it there.

chrisdone commented 5 years ago

Moved it. :+1: