Commit 98508e7f authored by Dato Simó's avatar Dato Simó
Browse files

BasicTypes.hs: fix docstring for eitherToResult



eitherToResult now converts from `Either a b` to `GenericResult`, not
necessarily from `Either String` only. Also, fix a typo.
Signed-off-by: default avatarDato Simó <dato@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 06c9a9d6
...@@ -123,7 +123,7 @@ isOk _ = False ...@@ -123,7 +123,7 @@ isOk _ = False
isBad :: GenericResult a b -> Bool isBad :: GenericResult a b -> Bool
isBad = not . isOk isBad = not . isOk
-- | Converter from Either String to 'GeneicResult'. -- | Converter from Either to 'GenericResult'.
eitherToResult :: Either a b -> GenericResult a b eitherToResult :: Either a b -> GenericResult a b
eitherToResult (Left s) = Bad s eitherToResult (Left s) = Bad s
eitherToResult (Right v) = Ok v eitherToResult (Right v) = Ok v
......
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