Skip to content

hie: Initialise the proper environment for calling dsExpr

Matthew Pickering requested to merge wip/hie-lookup into master

We now use DsM as the base monad for writing hie files and properly initialise it from the TcGblEnv.

Before, we would end up reading the interface file from disk for the module we were currently compiling. The modules iface then ended up in the EPS causing all sorts of subtle carnage, including difference in the generated core and haddock emitting a lot of warnings. With the fix, the module in the TcGblEnv is set correctly so the lookups happen in the local name env rather than thinking the identifier comes from an external package.

Fixes #19693 (closed) and #19334 (closed)

Merge request reports