diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-03-19 12:34:20 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-03-19 12:36:04 -0700 |
commit | 005f0fbcd558636f0d5db1203427a4d7b341f36e (patch) | |
tree | 6915f519e544ae7647e8b661d83d5e6b2b13a10d /src/Text/Pandoc/Shared.hs | |
parent | 425c2e47b5245ec0eec3eb294a83250252eb3efa (diff) | |
download | pandoc-005f0fbcd558636f0d5db1203427a4d7b341f36e.tar.gz |
T.P.Shared: Remove ToString, ToText typeclasses [API change].
T.P.Parsing: revise type of readWithM so that it takes a Text
rather than a polymorphic ToText value.
These typeclasses were there to ease the transition from String
to Text. They are no longer needed, and they may clash with
more useful versions under the same name.
This will require a bump to 2.13.
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 0ce9396b3..46aea9c03 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -25,8 +25,6 @@ module Text.Pandoc.Shared ( ordNub, findM, -- * Text processing - ToString (..), - ToText (..), tshow, backslashEscapes, escapeStringUsing, @@ -183,24 +181,6 @@ findM p = foldr go (pure Nothing) -- Text processing -- -class ToString a where - toString :: a -> String - -instance ToString String where - toString = id - -instance ToString T.Text where - toString = T.unpack - -class ToText a where - toText :: a -> T.Text - -instance ToText String where - toText = T.pack - -instance ToText T.Text where - toText = id - tshow :: Show a => a -> T.Text tshow = T.pack . show |