Commit 3910d3e2 authored by Richard Eisenberg's avatar Richard Eisenberg
Browse files

Add some commentary re: fix to #11203

The fix for #11203 prohibits duplicate SigTvs in non-CUSK kind
signatures by checking for duplicates after type inference is
done. This works well. GHC also checks for duplicate SigTvs
after working with partial type signatures (another place where
SigTvs arise). However, neither fix eliminates this whole class
of problems (because doing so would be heavier than we would
like). So, this comment adds a warning to users of newSigTyVar
to be aware of problems with duplicates.
parent 68149452
......@@ -583,6 +583,13 @@ instead of the buggous
-- a SigTv can unify with type *variables* only, including other SigTvs
-- and skolems. Sometimes, they can unify with type variables that the
-- user would rather keep distinct; see #11203 for an example.
-- So, any client of this
-- function needs to either allow the SigTvs to unify with each other
-- (say, for pattern-bound scoped type variables), or check that they
-- don't (say, with a call to findDubSigTvs).
newSigTyVar :: Name -> Kind -> TcM TcTyVar
newSigTyVar name kind
= do { details <- newMetaDetails SigTv
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment