From a083e8557aa1f3185c8fd35dc32427f535e315b0 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 28 Dec 2010 10:31:54 +0100
Subject: [PATCH] Document Utils.tryFromObj

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Balazs Lecz <leczb@google.com>
---
 Ganeti/HTools/Utils.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Ganeti/HTools/Utils.hs b/Ganeti/HTools/Utils.hs
index 45b9d5e52..609185806 100644
--- a/Ganeti/HTools/Utils.hs
+++ b/Ganeti/HTools/Utils.hs
@@ -157,7 +157,10 @@ annotateResult _ v = v
 -- | Try to extract a key from a object with better error reporting
 -- than fromObj
 tryFromObj :: (J.JSON a) =>
-              String -> [(String, J.JSValue)] -> String -> Result a
+              String                -- ^ Textual "owner" in error messages
+           -> [(String, J.JSValue)] -- ^ The object array
+           -> String                -- ^ The desired key from the object
+           -> Result a
 tryFromObj t o k = annotateResult t (fromObj k o)
 
 -- | Small wrapper over readJSON.
-- 
GitLab