runErrorM :: ErrorM a -> Either Errors ([Warning], a)
runErrorM (ErrorM m) = do
    (a, errorsAndWarnings) <- runStateT m []
    let (errors, warnings) = partitionEithers errorsAndWarnings
    case errors of
         [] -> Right (warnings, a)
         _  -> Left errorsAndWarnings
runErrorM :: ErrorM a -> Either Errors ([Warning], a)
runErrorM (ErrorM m) = do
    (a, errorsAndWarnings) <- runStateT m []
    let (errors, warnings) = partitionEithers errorsAndWarnings
    case errors of
         [] -> Right (warnings, a)
         _  -> Left errorsAndWarnings
runErrorM (ErrorM m) = do
    (a, errorsAndWarnings) <- runStateT m []
    let (errors, warnings) = partitionEithers errorsAndWarnings
    case errors of
         [] -> Right (warnings, a)
         _  -> Left errorsAndWarnings