Agda-126.96.36.199: A dependently typed functional programming language and proof assistant
Utilities for the Either type
isLeft :: Either a b -> BoolSource
Returns True iff the argument is Left x for some x.
isRight :: Either a b -> BoolSource
Returns True iff the argument is Right x for some x.
allRight :: [Either a b] -> Either [Either a b] [b]Source
Returns Right input with tags stripped if all elements are
to the right, and otherwise Left input:
Right input with tags stripped
allRight xs ==
if all isRight xs then
Right (map ((Right x) -> x) xs)
tests :: IO BoolSource
Produced by Haddock version 2.10.0