Note [inferResultToType]
expTypeToType and inferResultType convert an InferResult to a monotype. It must be a monotype because if the InferResult isn't already filled in, we fill it in with a unification variable (hence monotype). So to preserve order-independence we check for mono-type-ness even if it *is* filled in already. See also Note [TcLevel of ExpType] above, and Note [fillInferResult] in GHC.Tc.Utils.Unify.
References 2
- TcLevel of ExpType GHC.Tc.Utils.TcMType
- fillInferResult GHC.Tc.Utils.Unify
Referenced by 1
- GHC.Tc.Utils.TcMType call site