-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple raw string quotation and dictionary interpolation -- @package rawstring-qm @version 0.2.0 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 ToText ByteString instance ToText ByteString instance ToText String instance ToText Text instance ToText Text instance ToText Double instance ToText Float instance ToText Integer instance ToText Int 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 '$var' and '${expr}' into a string -- literal. var and expr are just Names output is of type text vars are -- auto converted to text qt :: QuasiQuoter -- | QuasiQuoter for interpolating '$var' and '${expr}' into a string -- literal. var and expr are just Names type lazy text, vars are -- magically (via ToText typeclass) converted to text qtl :: QuasiQuoter instance Show StringPart