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>
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