Skip to content

Draft: RTTI: Use only type variables with TcTyVar constructors.

Roland Senn requested to merge RolandSenn/ghc:T10617 into master

In Haskell code, a lot of values are defined with polymorphic types. During program execution, however, there are no polymorphic values, every value has a fixed monomorphic type. At a breakpoint, the GHCi debugger tries to calculate the monomorphic type from a polymorphic function definition in the source. To do this, it creates constraint equations from the type variables of runtime values and solves these equation with the normal GHC type inference engine.

To build these equations, select only type variables with TcTyVar constructors as they contain the wanted RuntumeUnk type variables, remove type/kind variables with TyVar constructors, as they are not needed.

(Fixes #10616 (closed) and #10617 (closed))

Edited by Roland Senn

Merge request reports