summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Sources.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Sources.hs b/src/Text/Pandoc/Sources.hs
index f17e566c9..69dc42812 100644
--- a/src/Text/Pandoc/Sources.hs
+++ b/src/Text/Pandoc/Sources.hs
@@ -46,6 +46,8 @@ import Text.Parsec (Stream(..), ParsecT)
import Text.Parsec.Pos as P
import Data.Text (Text)
import qualified Data.Text as T
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.Lazy as BL
import Data.Char (isSpace, isLetter, isAlphaNum, isDigit, isHexDigit)
import Data.String (IsString(..))
import qualified Data.List.NonEmpty as NonEmpty
@@ -112,6 +114,15 @@ class UpdateSourcePos s c where
instance UpdateSourcePos Text Char where
updateSourcePos pos c _ = updatePosChar pos c
+instance UpdateSourcePos [Char] Char where
+ updateSourcePos pos c _ = updatePosChar pos c
+
+instance UpdateSourcePos BS.ByteString Char where
+ updateSourcePos pos c _ = updatePosChar pos c
+
+instance UpdateSourcePos BL.ByteString Char where
+ updateSourcePos pos c _ = updatePosChar pos c
+
instance UpdateSourcePos Sources Char where
updateSourcePos pos c sources =
case sources of