-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Simple raw string quotation and dictionary interpolation
--
-- Supply a couple of usefull QuasiQuotes so we can use functions to
-- lookup values It has quasiquotes for Strings, Text and Builders
@package rawstring-qm
@version 0.2.3.0
module Data.Text.ToTextBuilder
class ToTextBuilder a
toTextBuilder :: ToTextBuilder a => a -> Builder
instance Data.Text.ToTextBuilder.ToTextBuilder GHC.Types.Int
instance Data.Text.ToTextBuilder.ToTextBuilder GHC.Integer.Type.Integer
instance Data.Text.ToTextBuilder.ToTextBuilder GHC.Types.Float
instance Data.Text.ToTextBuilder.ToTextBuilder GHC.Types.Double
instance Data.Text.ToTextBuilder.ToTextBuilder GHC.Types.Char
instance Data.Text.ToTextBuilder.ToTextBuilder Data.Text.Internal.Text
instance Data.Text.ToTextBuilder.ToTextBuilder Data.Text.Internal.Lazy.Text
instance Data.Text.ToTextBuilder.ToTextBuilder GHC.Base.String
module Data.Text.ToText
class (Typeable a, Read a) => ToText a where toText = toStrict . toLazyText fromText v = maybe (Left $ "parse failed: `" <> v <> "` can not be parsed as" <> pack (show (typeOf (undefined :: a)))) Right . readMaybe . unpack $ v maybeFromText = either (const Nothing) Just . fromText fromLazyText = fromText . toStrict maybeFromLazyText = either (const Nothing) Just . fromLazyText
toText :: ToText a => a -> Text
toLazyText :: ToText a => a -> Text
fromText :: ToText a => Text -> Either Text a
maybeFromText :: ToText a => Text -> Maybe a
fromLazyText :: ToText a => Text -> Either Text a
maybeFromLazyText :: ToText a => Text -> Maybe a
instance (Data.Text.ToTextBuilder.ToTextBuilder a, GHC.Read.Read a, Data.Typeable.Internal.Typeable a) => Data.Text.ToText.ToText a
instance Data.Text.ToText.ToText Data.Text.Internal.Text
instance Data.Text.ToText.ToText Data.Text.Internal.Lazy.Text
instance Data.Text.ToText.ToText GHC.Base.String
instance Data.Text.ToText.ToText Data.ByteString.Internal.ByteString
instance Data.Text.ToText.ToText Data.ByteString.Lazy.Internal.ByteString
module Data.String.QM
-- | qq is a block quote extension, it can be used anywhere you would put
-- normal quotes but you would require to have new line in them if you
-- put it as a pattern it will expan to 'a':'b':'c'...
qq :: QuasiQuoter
-- | QuasiQuoter for interpolating '$var' and '${expr}' into a string
-- literal. var and expr are just Names
qm :: QuasiQuoter
-- | QuasiQuoter for interpolating '${expr}' into a string literal. var and
-- expr are just Names
qn :: QuasiQuoter
-- | QuasiQuoter for interpolating '${expr}' into strict text. var and expr
-- are just Names output is of type text vars are auto converted to text
qt :: QuasiQuoter
-- | QuasiQuoter for interpolating '${expr}' into a lazy text. var and expr
-- are just Names type lazy text, vars are magically (via ToText
-- typeclass) converted to text
qtl :: QuasiQuoter
-- | QuasiQuoter for interpolating '${expr}' into a text builder. var and
-- expr are just Names type lazy text, vars are magically (via
-- ToTextBuilder typeclass) converted to text
qtb :: QuasiQuoter
instance GHC.Show.Show Data.String.QM.StringPart