-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | QuasiQuoter for Perl6-style multi-line interpolated strings with "q", "qq" and "qc" support. -- -- QuasiQuoter for Perl6-style multi-line interpolated strings with -- q, qq and qc support. @package interpolatedstring-perl6 @version 0.3 -- | QuasiQuoter for interpolated strings using Perl 6 syntax. -- -- The q form does one thin and does it well: It contains a -- multi-line string with no interpolation at all: -- --
--    {--}
--    import Text.InterpolatedString.Perl6 (q)
--    foo :: String
--    foo = [$q|
--   
--   Well here is a
--        multi-line string!
--   
--   |]
--   
-- -- The qc form interpolates curly braces: Expressions inside {} -- will be directly interpolated if it's a String, or have show -- called if it is not. -- -- Escapin of '{' is done with backslash. -- -- For interpolatin numeric expressions without an explicit type -- signature, use the ExtendedDefaultRules lanuage pragma, as shown -- below: -- --
--   {--}
--   import Text.InterpolatedString.Perl6 (qc)
--   bar :: String
--   bar = [$qc| Well {"hello" ++ " there"} {6 * 7} |]
--   
-- -- bar will have the value " Well hello there 42 ". -- -- If you want control over how show works on your types, define a -- custom ShowQ instance: -- --
--   import Text.InterpolatedString.Perl6 (qc, ShowQ(..))
--   instance ShowQ ByteString where
--       showQ = unpack
--   
-- -- That way you interpolate bytestrings will not result in double quotes -- or character escapes. -- -- The qq form adds to the qc form with a simple shorthand: -- '$foo' means '{foo}', namely interpolating a single variable into the -- string. -- --
--   {--}
--   import Text.InterpolatedString.Perl6 (qq)
--   baz :: String
--   baz = [$qc| Hello, $who |]
--       where
--       who = World
--   
module Text.InterpolatedString.Perl6 -- | QuasiQuoter for interpolating '$var' and '{expr}' into a string -- literal. The pattern portion is undefined. qq :: QuasiQuoter -- | QuasiQuoter for interpolating '{expr}' into a string literal. The -- pattern portion is undefined. qc :: QuasiQuoter -- | QuasiQuoter for a non-interpolating string literal. The pattern -- portion is undefined. q :: QuasiQuoter class ShowQ a showQ :: (ShowQ a) => a -> String instance [overlap ok] Show StringPart instance [overlap ok] (Show a) => ShowQ a instance [overlap ok] ShowQ String instance [overlap ok] ShowQ Char