@@ -12,6 +12,7 @@ import Control.Monad.Reader (ask)
1212import Control.Monad.RWS (RWST, runRWST)
1313import Control.Monad.State (get, modify)
1414import Control.Monad.Trans (liftIO)
15+import Data.List (intercalate)
1516import Data.Map (Map)
1617import qualified Data.Map as M
1718import Data.Monoid (mempty)
@@ -171,7 +172,9 @@ pickAndChase = do
171172--------------------------------------------------------------------------------
172173chase :: [Identifier] -> Identifier -> Runtime ()
173174chase trail id'
174− | id' `elem` trail = return () -- Cycle detected!
175+ | id' `elem` trail = throwError $ "Hakyll.Core.Runtime.chase: " ++
176+ "Dependency cycle detected: " ++ intercalate " depends on "
177+ (map show $ dropWhile (/= id') (reverse trail) ++ [id'])
175178 | otherwise = do
176179 logger <- runtimeLogger <$> ask
177180 todo <- runtimeTodo <$> get