summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/DirectedGraph/DependencySolver.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll/Core/DirectedGraph/DependencySolver.hs')
-rw-r--r--src/Hakyll/Core/DirectedGraph/DependencySolver.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Hakyll/Core/DirectedGraph/DependencySolver.hs b/src/Hakyll/Core/DirectedGraph/DependencySolver.hs
index 17a4b69..214211b 100644
--- a/src/Hakyll/Core/DirectedGraph/DependencySolver.hs
+++ b/src/Hakyll/Core/DirectedGraph/DependencySolver.hs
@@ -60,8 +60,11 @@ order temp stack set graph@(DirectedGraph graph')
-- one first...
(dep : _) -> if (nodeTag dep) `S.member` set
-- The dependency is already in our stack - cycle detected!
- then error "order: Cycle detected!" -- TODO: Dump cycle
+ then cycleError
-- Continue with the dependency
else order temp (dep : node : stackTail)
(S.insert (nodeTag dep) set)
graph
+ where
+ cycleError = error $ "Hakyll.Core.DirectedGraph.DependencySolver.order: "
+ ++ "Cycle detected!" -- TODO: Dump cycle