Portability | Requires OverloadedStrings |
---|---|
Stability | Stable |
Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> |
- (<>) :: Monoid s => s -> s -> s
- mid :: Monoid s => s -> s -> s -> s
- (<+>) :: (Monoid s, IsString s) => s -> s -> s
- ($$) :: (Monoid s, IsString s) => s -> s -> s
- intercalate :: Monoid s => (s -> s -> s) -> [s] -> s
- hcat :: Monoid s => [s] -> s
- hsep :: (Monoid s, IsString s) => [s] -> s
- vcat :: (Monoid s, IsString s) => [s] -> s
- punctuate :: Monoid s => s -> [s] -> [s]
- between :: Monoid s => s -> s -> s -> s
- paren :: (Monoid s, IsString s) => s -> s
- thenParen :: (Monoid s, IsString s) => Bool -> s -> s
- brackets :: (Monoid s, IsString s) => s -> s
- braces :: (Monoid s, IsString s) => s -> s
- angleBrackets :: (Monoid s, IsString s) => s -> s
- quotes :: (Monoid s, IsString s) => s -> s
- doubleQuotes :: (Monoid s, IsString s) => s -> s
- char :: IsString s => Char -> s
- semi :: IsString s => s
- colon :: IsString s => s
- comma :: IsString s => s
- space :: IsString s => s
- newline :: IsString s => s
- equals :: IsString s => s
- lparen :: IsString s => s
- rparen :: IsString s => s
- lbrack :: IsString s => s
- rbrack :: IsString s => s
- lbrace :: IsString s => s
- rbrace :: IsString s => s
- labrack :: IsString s => s
- rabrack :: IsString s => s
- fromShow :: (Show a, IsString s) => a -> s
- int :: IsString s => Int -> s
- integer :: IsString s => Integer -> s
- float :: IsString s => Float -> s
- double :: IsString s => Double -> s
- rational :: IsString s => Rational -> s
Combining
mid :: Monoid s => s -> s -> s -> sSource
mid m x y
Puts x
and y
around m
.
Note that: mid m x y =
between
x y m
.
(<+>) :: (Monoid s, IsString s) => s -> s -> sSource
Put two string-likes besides eachother separated by a space.
intercalate :: Monoid s => (s -> s -> s) -> [s] -> sSource
Combine the string-likes with a given function.
hsep :: (Monoid s, IsString s) => [s] -> sSource
List version of <+>
.
Note that hsep =
.
intercalate
(<+>
)
Wrapping in delimiters
thenParen :: (Monoid s, IsString s) => Bool -> s -> sSource
Like showParen
conditionally wraps a string in (...)
This function is supposed to be used infix as in:
(precedence >= 10) `thenParen` ("fun" <+> "arg")
angleBrackets :: (Monoid s, IsString s) => s -> sSource
Wrap a string-like in <...>
.
doubleQuotes :: (Monoid s, IsString s) => s -> sSource
Wrap a string-like in "..."
.