Print the "type description" of a closure for profiling as the user
string, not the Z-encoded string. Fixes problems with things like
'ZMZN' appearing in profiling output.
import CmdLineOpts ( opt_PprStyle_RawTypes )
import Maybes ( maybeToBool )
import Name ( getOccString, getOccName )
import CmdLineOpts ( opt_PprStyle_RawTypes )
import Maybes ( maybeToBool )
import Name ( getOccString, getOccName )
+import OccName ( occNameUserString )
import Outputable
import Unique ( Uniquable(..) )
import Util ( lengthIs )
import Outputable
import Unique ( Uniquable(..) )
import Util ( lengthIs )
TyVarTy _ -> "*"
AppTy fun _ -> getTyDescription fun
FunTy _ res -> '-' : '>' : fun_result res
TyVarTy _ -> "*"
AppTy fun _ -> getTyDescription fun
FunTy _ res -> '-' : '>' : fun_result res
- TyConApp tycon _ -> getOccString tycon
+ TyConApp tycon _ -> occNameUserString (getOccName tycon)
NoteTy (FTVNote _) ty -> getTyDescription ty
NoteTy (SynNote ty1) _ -> getTyDescription ty1
SourceTy sty -> getSourceTyDescription sty
NoteTy (FTVNote _) ty -> getTyDescription ty
NoteTy (SynNote ty1) _ -> getTyDescription ty1
SourceTy sty -> getSourceTyDescription sty