5

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?

bennofs
  • 11,873
  • 1
  • 38
  • 62
Jacob Wang
  • 4,411
  • 5
  • 29
  • 43

1 Answers1

5

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.

Ørjan Johansen
  • 18,119
  • 3
  • 43
  • 53