GHC heap profiling with -hy - What is * (star)?

你离开我真会死。 提交于 2020-01-03 18:25:07

问题


When I profile my program's heap usage with -hy flag like

./prog +RTS -hy

I often see the constructor * in the results, along with other constructors such as [] and Word8.

What is the type * in this context? Is it related to kinds?


回答1:


Quoted from Real World Haskell:

There's also some heap allocated data of unknown type (represented as data of type "*").

And in the GHC User's Guide:

For closures which have function type or unknown/polymorphic type, the string will represent an approximation to the actual type.

So, it means basically that the profiling doesn't have enough information to tell what type it is.



来源:https://stackoverflow.com/questions/24966628/ghc-heap-profiling-with-hy-what-is-star

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!