decodeAsListWithScores (Right pairs) = let (strs, scores) = unzip pairs in
    case mapM decode strs of
        Left decodeErr -> return $ Left (Error $ encode decodeErr)
        Right vals     -> return $ Right (zip vals scores)
decodeAsListWithScores (Right pairs) = let (strs, scores) = unzip pairs in
    case mapM decode strs of
        Left decodeErr -> return $ Left (Error $ encode decodeErr)
        Right vals     -> return $ Right (zip vals scores)
decodeAsListWithScores (Right pairs) = let (strs, scores) = unzip pairs in
    case mapM decode strs of
        Left decodeErr -> return $ Left (Error $ encode decodeErr)
        Right vals     -> return $ Right (zip vals scores)