 | HStringTemplate-0.3.1: StringTemplate implementation in Haskell. | Contents | Index |
|
| Text.StringTemplate.Classes |
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data SElem a |
|
|
| class Show a => StringTemplateShows a where |
| 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 | | stringTemplateShow :: a -> String | | Defaults to show.
| | | stringTemplateFormattedShow :: String -> a -> String | | Defaults to _ a -> stringTemplateShow a
|
|
|
|
| class ToSElem a where |
| The ToSElem class should be instantiated for all types that can be
inserted as attributes into a StringTemplate.
| | | Methods | |
|
|
| type SMap a = Map String (SElem a) |
|
| data STShow |
|
|
| newtype StFirst a |
| Constructors | | Instances | |
|
|
| class Monoid a => Stringable a where |
| The Stringable class should be instantiated with care.
Generally, the provided instances should be enough for anything.
| | | Methods | | stFromString :: String -> a | | | stToString :: a -> String | | | mconcatMap :: [b] -> (b -> a) -> a | | Defaults to mconcatMap m k = foldr (mappend . k) mempty m
| | | mintercalate :: a -> [a] -> a | | Defaults to (mconcat .) . intersperse
| | | mlabel :: a -> a -> a | | Defaults to mlabel x y = mconcat [x, stFromString [, y, stFromString ]]
|
|
|
|
| stShowsToSE :: (StringTemplateShows a, Stringable b) => a -> SElem b |
| This method should be used to create ToSElem instances for
types defining a custom formatted show function.
|
|
| Produced by Haddock version 2.0.0.0 |