Safe Haskell | Safe |
---|
Support module for the interpol
preprocessor.
Documentation
(^-^), interpol :: (ToString a, ToString b) => a -> b -> StringSource
Append a showable value to a String
in a smart way. In
particular, do not show
a String
, as this encloses it in
"quotes". So, depending on the type of the second parameter,
^-^
is equivalent to one of the following
x ^-^ y = x ++ y x ^-^ y = x ++ show y
For all intents and purposes, the ToString
type-class is a
wrapper around Show
, so any type that has an instance for Show
will also have an instance for Interpol
.