izeOf' f (TETag tagty id args)                     =
  let hasTaggedType arg = case getTypeAnno arg of
                            vari@(TVari _) -> vari == tagty
                            TRecInd _ vari    -> vari == tagty
                            _              -> False
      sizeChangingArgs = filter hasTaggedType args
  in case sizeChangingArgs of
       []    -> return Min
       [arg] -> do size <- sizeOf' f arg; return $ C size
       args  -> do sizes <- mapM (sizeOf' f) args
                   return (Multiple $ map C sizes)

sizeOf' f (TETag tagty id args)                     =
  let hasTaggedType arg = case getTypeAnno arg of
                            vari@(TVari _) -> vari == tagty
                            TRecInd _ vari    -> vari == tagty
                            _              -> False
      sizeChangingArgs = filter hasTaggedType args
  in case sizeChangingArgs of
       []    -> return Min
       [arg] -> do size <- sizeOf' f arg; return $ C size
       args  -> do sizes <- mapM (sizeOf' f) args
                   return (Multiple $ map C sizes)
sizeOf' f (TETag tagty id args)                     =
  let hasTaggedType arg = case getTypeAnno arg of
                            vari@(TVari _) -> vari == tagty
                            TRecInd _ vari    -> vari == tagty
                            _              -> False
      sizeChangingArgs = filter hasTaggedType args
  in case sizeChangingArgs of
       []    -> return Min
       [arg] -> do size <- sizeOf' f arg; return $ C size
       args  -> do sizes <- mapM (sizeOf' f) args
                   return (Multiple $ map C sizes)