summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Core/CompiledItem.hs2
-rw-r--r--src/Hakyll/Core/DirectedGraph/DependencySolver.hs5
-rw-r--r--src/Hakyll/Core/DirectedGraph/Internal.hs5
-rw-r--r--src/Hakyll/Web/Pandoc.hs2
-rw-r--r--src/Hakyll/Web/Template/Internal.hs3
5 files changed, 12 insertions, 5 deletions
diff --git a/src/Hakyll/Core/CompiledItem.hs b/src/Hakyll/Core/CompiledItem.hs
index d12d172..a803971 100644
--- a/src/Hakyll/Core/CompiledItem.hs
+++ b/src/Hakyll/Core/CompiledItem.hs
@@ -36,4 +36,4 @@ unCompiledItem :: (Binary a, Typeable a, Writable a)
-> a
unCompiledItem (CompiledItem x) = case cast x of
Just x' -> x'
- Nothing -> error "unCompiledItem: Unsupported type"
+ Nothing -> error "Hakyll.Core.CompiledItem.unCompiledItem: Unsupported type"
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
diff --git a/src/Hakyll/Core/DirectedGraph/Internal.hs b/src/Hakyll/Core/DirectedGraph/Internal.hs
index 52a712d..bc9cd92 100644
--- a/src/Hakyll/Core/DirectedGraph/Internal.hs
+++ b/src/Hakyll/Core/DirectedGraph/Internal.hs
@@ -24,8 +24,11 @@ data Node a = Node
--
appendNodes :: Ord a => Node a -> Node a -> Node a
appendNodes (Node t1 n1) (Node t2 n2)
- | t1 /= t2 = error "appendNodes: Appending differently tagged nodes"
+ | t1 /= t2 = error'
| otherwise = Node t1 (n1 `S.union` n2)
+ where
+ error' = error $ "Hakyll.Core.DirectedGraph.Internal.appendNodes: "
+ ++ "Appending differently tagged nodes"
-- | Type used to represent a directed graph
--
diff --git a/src/Hakyll/Web/Pandoc.hs b/src/Hakyll/Web/Pandoc.hs
index 7fecdc4..2656212 100644
--- a/src/Hakyll/Web/Pandoc.hs
+++ b/src/Hakyll/Web/Pandoc.hs
@@ -50,7 +50,7 @@ readPandocWith state fileType' = case fileType' of
Markdown -> P.readMarkdown state
Rst -> P.readRST state
t -> error $
- "readPandoc: I don't know how to read " ++ show t
+ "Hakyll.Web.readPandocWith: I don't know how to read " ++ show t
-- | Write a document (as HTML) using pandoc, with the default options
--
diff --git a/src/Hakyll/Web/Template/Internal.hs b/src/Hakyll/Web/Template/Internal.hs
index be10881..096c928 100644
--- a/src/Hakyll/Web/Template/Internal.hs
+++ b/src/Hakyll/Web/Template/Internal.hs
@@ -41,4 +41,5 @@ instance Binary TemplateElement where
0 -> Chunk <$> get
1 -> Identifier <$> get
2 -> Escaped <$> get
- _ -> error "Error reading cached template"
+ _ -> error $ "Hakyll.Web.Template.Internal: "
+ ++ "Error reading cached template"