From 98508e7f2049127f58af27db5ad7a1eb0ed519dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dato=20Sim=C3=B3?= <dato@google.com> Date: Fri, 19 Oct 2012 15:54:54 +0100 Subject: [PATCH] BasicTypes.hs: fix docstring for eitherToResult MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eitherToResult now converts from `Either a b` to `GenericResult`, not necessarily from `Either String` only. Also, fix a typo. Signed-off-by: Dato SimΓ³ <dato@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- htools/Ganeti/BasicTypes.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htools/Ganeti/BasicTypes.hs b/htools/Ganeti/BasicTypes.hs index 8f29f33e1..149540fdb 100644 --- a/htools/Ganeti/BasicTypes.hs +++ b/htools/Ganeti/BasicTypes.hs @@ -123,7 +123,7 @@ isOk _ = False isBad :: GenericResult a b -> Bool isBad = not . isOk --- | Converter from Either String to 'GeneicResult'. +-- | Converter from Either to 'GenericResult'. eitherToResult :: Either a b -> GenericResult a b eitherToResult (Left s) = Bad s eitherToResult (Right v) = Ok v -- GitLab