Skip to content

Check and document that Ids in the TcLclEnv have a fixed RuntimeRep

We should add assertions that check that all the Ids added to the TcLclEnv have a fixed RuntimeRep in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete. As well as a Note that clearly articulates this invariant that we can refer to.

I'm not sure exactly where to put assertions to cover all cases, but tc_extend_local_env in GHC.Tc.Utils.Env seems to be a good start. It might be worth refactoring a bit to ensure that all functions that add to the tcl_env go through the same codepath.

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