irc-fun-color-0.2.1.0: Add color and style decorations to IRC messages.

Safe HaskellNone
LanguageHaskell2010

Network.IRC.Fun.Color.Format

Description

This module provides functions which insert values into format templates, much like printf. They are simply the same ones found in Formatting, but with slightly different names which are more convenient when strict Text is a package's default (e.g. in IRC related packages where strings are likely short). Suggested usage:

import Network.IRC.Fun.Color.Format
import Formatting hiding (format, sformat)

You may wish to use some formatters as well:

import Network.IRC.Fun.Color.Format
import Network.IRC.Fun.Color.Format.Long
import Formatting hiding (format, sformat, text, stext)

Synopsis

Documentation

format :: Format Text a -> a Source

Run the formatter and return a strict Text value.

lformat :: Format Text a -> a Source

Run the formatter and return a lazy Text value.

formatMsg :: Format MsgContent a -> a Source

Run the formatter and return MsgContent, which is simply a wrapper of strict Text. This is s shortcut for MsgContent . format.