Commit a083e855 authored by Iustin Pop's avatar Iustin Pop
Browse files

Document Utils.tryFromObj


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
parent 6bc39970
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment