Skip to content

GHC does not rewrite in FunTy, part II

@rae observed that GHC failed to rewrite kinds in FunTy in #19677 (closed), and he fixed the issue in MR !2477 (closed) by ensuring that in the rewriter, when rewriting FunTy, we also rewrite the kinds. See GHC.Tc.Solver.Rewrite.rewrite_one (FunTy ...).

However, there are other places in the compiler where we rewrite a FunTy, but which have not been adapted:

  1. GHC.Core.FamInstEnv.normalise_type,
  2. GHC.Tc.Solver.Monad.breakTyVarCycle_maybe.

It seems to me that we should be consistent and do the same thing in these other places.

Edited by sheaf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information