From 62b30d841823f6b9452e5a3d26b2ef5b52ca531c Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sat, 3 Dec 2016 22:39:25 +0100
Subject: Give source position for include file loop.

---
 src/Text/Pandoc/Readers/LaTeX.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/Text/Pandoc/Readers')

diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index abc37001c..222b91e5d 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -960,7 +960,7 @@ include = do
   mconcat <$> forM fs' (\f -> do
     containers <- stateContainers <$> getState
     when (f `elem` containers) $
-      throwError $ PandocParseError $ "Include file loop in " ++ f
+      throwError $ PandocParseError $ "Include file loop at " ++ show oldPos
     updateState $ \s -> s{ stateContainers = f : stateContainers s }
     contents <- lift $ readTeXFile f
     setPosition $ newPos f 1 1
-- 
cgit v1.2.3