|
Text.StringTemplate.Classes |
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
|
|
|
The StringTemplateShows class should be instantiated for all types that are
directly displayed in a StringTemplate, but take an optional format string. Each such type must have an appropriate ToSElem method defined as well.
| | Methods | | Defaults to show.
| | | Defaults to _ a -> stringTemplateShow a
|
| | Instances | |
|
|
|
The ToSElem class should be instantiated for all types that can be
inserted as attributes into a StringTemplate.
| | Methods | | | Instances | ToSElem Bool | ToSElem Char | ToSElem Double | ToSElem Float | ToSElem Int | ToSElem Integer | ToSElem LocalTime | ToSElem ZonedTime | ToSElem TimeOfDay | ToSElem TimeZone | ToSElem UTCTime | ToSElem Day | ToSElem CalendarTime | ToSElem TimeDiff | ToSElem a => ToSElem ([] a) | Integral a => ToSElem (Ratio a) | ToSElem a => ToSElem (Maybe a) | (ToSElem a, ToSElem b) => ToSElem ((,) a b) | (ToSElem a, Ix i) => ToSElem (Array i a) | ToSElem a => ToSElem (Map String a) | (ToSElem a, ToSElem b, ToSElem c) => ToSElem ((,,) a b c) | (ToSElem a, ToSElem b, ToSElem c, ToSElem d) => ToSElem ((,,,) a b c d) | (ToSElem a, ToSElem b, ToSElem c, ToSElem d, ToSElem e) => ToSElem ((,,,,) a b c d e) |
|
|
|
|
|
|
|
|
|
Constructors | | Instances | |
|
|
|
The Stringable class should be instantiated with care.
Generally, the provided instances should be enough for anything.
| | Methods | | | | | mconcatMap :: [b] -> (b -> a) -> a | Source |
| Defaults to mconcatMap m k = foldr (mappend . k) mempty m
| | mintercalate :: a -> [a] -> a | Source |
| Defaults to (mconcat .) . intersperse
| | | Defaults to mlabel x y = mconcat [x, stFromString [, y, stFromString ]]
|
| | Instances | |
|
|
|
This method should be used to create ToSElem instances for
types defining a custom formatted show function.
|
|
Produced by Haddock version 2.3.0 |