@@ -100,9 +100,11 @@ functionField name value = Context $ \k i -> case words k of
100100mapContext :: (String -> String) -> Context a -> Context a
101101mapContext f (Context c) = Context $ \k i -> do
102102 fld <- c k i
103− return $ case fld of
104− StringField str -> StringField (f str)
105− ListField ctx is -> ListField ctx is
103+ case fld of
104+ StringField str -> return $ StringField (f str)
105+ ListField _ _ -> fail $
106+ "Hakyll.Web.Template.Context.mapContext: " ++
107+ "can't map over a ListField!"
106108
107109
108110--------------------------------------------------------------------------------