Result is not a very composable data type, which makes it clunky to work with. If we add a Testable instance for Either String Unit we can use the whole machinery around the Either type and make testing a much more pleasant experience.
Contrived example of pleasant experience:
p :: Array String -> Either String Unit
p a = do
i <- note "Couldn't find hello." (elemIndex "hello" a)
if mod i 2 > 0
then Left "hello isn't on an index divisible by two."
else Right unit
In my opinion this experience becomes pleasant because I can use do-notation, note and a load of other niceties.
If you think this is a good idea I can implement the instance(s) needed and make a PR.
Resultis not a very composable data type, which makes it clunky to work with. If we add aTestableinstance forEither String Unitwe can use the whole machinery around theEithertype and make testing a much more pleasant experience.Contrived example of pleasant experience:
In my opinion this experience becomes pleasant because I can use do-notation,
noteand a load of other niceties.If you think this is a good idea I can implement the instance(s) needed and make a PR.