Sunday, May 28, 2006

A first tiny step

Yesterday night I managed to do it: modify the beast, compile, and test my changes!

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.
But it was actually a piece of cake!

Visit my darcs repository if you want to see the code

No comments: