The goal was to obtain the closure type of a HValue, the internal datatype representing linked BCOs (bytecode objects) used by ghci. It was a bit annoying to get there, because it involved
- unsafeCoerce# (aka the Blunt Instrument)
- fiddling with pointers
- and going down to C-land.
Visit my darcs repository if you want to see the code