How is it possible to collect all error messages in the Either Monad?
问题 I tried to validate the construction of a Record with Applicatives and the Either Monad . It works fine. But I can't see all Error Messages. Only the first is visible because the Right Path of the Either Monad ignores them. Here is my code: import Data.Either (either) import Text.Printf (printf) data Record = Record { fieldA :: String , fieldB :: String , fieldC :: String } deriving (Show, Eq) type Err = String setField :: String -> String -> Either Err String setField field value | length