I want to do the following wierd things with arbitrary Haskell program:
* Have an IO callback each time a closure is forced
* Dynamically load small Haskell expressions that will be executed in the callback
* Have access to the syntactic scope of closure being forced in the dynamically loaded expressions
* Navigate data graph a'la Java reflection
* Test if given closure has been forced
I see two ways of doing this:
1) Some Haskell implementation having super-reflective capabilities
2) Doing Haskell program transformation before running it
(1) seems doubtful, but I would be more than happy if someone proved me wrong :)
As for (2), I would kindly ask the readers of this list for suggestions:
* Which program tranformation tool to use. I need to compute syntactic scope of the closures.
And I need to know exact line and row numbers of syntactic constructions. Knowing types
of expressions of the program being transformed doesn't hurt either.
* Most of the features described above are straightforward to implement, but if some of these
have been implemented before I would be more than happy to reuse them.
In any case I would still need to load dynamically small Haskell expressions.
What is the best way to do it?
Disclaimer: I am not planning to do application programming using these techniques :)
With kind regards,
Oleg Mürk
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell