commonPredType :: CS.Sign f e -> Set.Set PredType -> Result PredType
commonPredType csig ps = do
  args <- commonType csig $ map predArgs $ Set.toList ps
  case args of
    _ : _ -> return $ PredType args
    _ -> fail $ "no common types for " ++ showDoc ps ""
commonPredType :: CS.Sign f e -> Set.Set PredType -> Result PredType
commonPredType csig ps = do
  args <- commonType csig $ map predArgs $ Set.toList ps
  case args of
    _ : _ -> return $ PredType args
    _ -> fail $ "no common types for " ++ showDoc ps ""
commonPredType csig ps = do
  args <- commonType csig $ map predArgs $ Set.toList ps
  case args of
    _ : _ -> return $ PredType args
    _ -> fail $ "no common types for " ++ showDoc ps ""