# Pastebin HvYTa6jj ExitSuccess -> do ​ let eitherResults = JSON.eitherDecode (UTF8.fromString stdout) :: Either String Results case eitherResults of Left error -> liftIO $ printf "Error: %s\n%s\n" error stdout Right results -> do let new_product = product { Product.stdout = Just results } sendProduct task new_product config ​ -- vs. either (liftIO $ printf "Error: %s\n%s\n" error stdout) (sendProduct task product { Product.stdout = Just results } config) JSON.eitherDecode (UTF8.fromString stdout)