-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Multiline strings, interpolation and templating. -- -- This package adds quasiquoter for multiline strings, interpolation and -- simple templating. It can handle repetition templates which makes it -- Handy for outputting larger structures, such as latex tables or -- gnuplot files. -- --
-- #<pattern> in <list>: <interpolated string> (|<interpolated string>)# ---- -- Where (|<interpolated string>) denotes optional separator for -- the elements. -- -- Multiline indentation is handled by aligning on smallest un-empty line -- after the first. Neither pattern matching nor nested #-patterns are -- supported, however, see example below. -- -- Normal '\\n' style escaping of special characters is intentionally not -- supported. Please use $endline$ or $n$ style instead. -- -- As an example, let's plot set of vectors with gnuplot: -- --
-- plotVecs :: [(String,[Double])] -> String -- plotVecs vs = -- [$str| ## Plot multiple vectors -- plot #(n,_) in vs:- with lines lw 5 title $:n$ |, # -- #d in map snd vs:$singleVec d$$endline$e$endline$# |] -- where -- singleVec n = [$str|#(e,i) in zip n [1..]: $:i$ $:e$|$endline$#|] ---- --
-- *Gnuplotter> plotVecs [("A",[1..5]),("B",[2..6])]
-- # Plot multiple vectors
-- plot - with lines lw 5 title "A" , - with lines lw 5 title "B"
-- 1 1.0
-- 2 2.0
-- 3 3.0
-- 4 4.0
-- 5 5.0
--
-- e
-- 1 2.0
-- 2 3.0
-- 3 4.0
-- 4 5.0
-- 5 6.0
--
-- e
--
--
-- Change log 0.2.5.2 - Possibly now compiles with GHC 6.12
str :: QuasiQuoter
prnt :: QuasiQuoter
-- | End of the line
endline :: String
-- | Tab
tab :: String
instance Typeable StringBits
instance Eq StringBits
instance Ord StringBits
instance Show StringBits
instance Data StringBits