diff options
Diffstat (limited to 'src/Hakyll/Core/Runtime.hs')
-rw-r--r-- | src/Hakyll/Core/Runtime.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Hakyll/Core/Runtime.hs b/src/Hakyll/Core/Runtime.hs index 39d72a7..b7dc4e8 100644 --- a/src/Hakyll/Core/Runtime.hs +++ b/src/Hakyll/Core/Runtime.hs @@ -12,6 +12,7 @@ import Control.Monad.Reader (ask) import Control.Monad.RWS (RWST, runRWST) import Control.Monad.State (get, modify) import Control.Monad.Trans (liftIO) +import Data.List (intercalate) import Data.Map (Map) import qualified Data.Map as M import Data.Monoid (mempty) @@ -171,7 +172,9 @@ pickAndChase = do -------------------------------------------------------------------------------- chase :: [Identifier] -> Identifier -> Runtime () chase trail id' - | id' `elem` trail = return () -- Cycle detected! + | id' `elem` trail = throwError $ "Hakyll.Core.Runtime.chase: " ++ + "Dependency cycle detected: " ++ intercalate " depends on " + (map show $ dropWhile (/= id') (reverse trail) ++ [id']) | otherwise = do logger <- runtimeLogger <$> ask todo <- runtimeTodo <$> get |